27.1 KB
/srv/reproducible-results/rbuild-debian/tmp.xzlKTURExa/b1/node-promise_8.0.1-1_i386.changes vs.
/srv/reproducible-results/rbuild-debian/tmp.xzlKTURExa/b2/node-promise_8.0.1-1_i386.changes
208 B
Files
    
Offset 1, 2 lines modifiedOffset 1, 2 lines modified
  
1 ·​a5de7c6533c89c8d55a99​e0ec2640f95·​35480·​javascript·​optional·​node-​promise_8.​0.​1-​1_all.​deb1 ·​a768cd9fdef3ea23c7157​7f70b8b8418·​35504·​javascript·​optional·​node-​promise_8.​0.​1-​1_all.​deb
26.7 KB
node-promise_8.0.1-1_all.deb
452 B
file list
    
Offset 1, 3 lines modifiedOffset 1, 3 lines modified
1 -​rw-​r-​-​r-​-​···​0········​0········​0········​4·​2018-​01-​03·​12:​57:​52.​000000·​debian-​binary1 -​rw-​r-​-​r-​-​···​0········​0········​0········​4·​2018-​01-​03·​12:​57:​52.​000000·​debian-​binary
2 -​rw-​r-​-​r-​-​···​0········​0········​0·····​2248·​2018-​01-​03·​12:​57:​52.​000000·​control.​tar.​xz2 -​rw-​r-​-​r-​-​···​0········​0········​0·····​2256·​2018-​01-​03·​12:​57:​52.​000000·​control.​tar.​xz
3 -​rw-​r-​-​r-​-​···​0········​0········​0····​33040·​2018-​01-​03·​12:​57:​52.​000000·​data.​tar.​xz3 -​rw-​r-​-​r-​-​···​0········​0········​0····​33056·​2018-​01-​03·​12:​57:​52.​000000·​data.​tar.​xz
98.0 B
control.tar.xz
70.0 B
control.tar
48.0 B
./md5sums
30.0 B
./md5sums
Files differ
26.1 KB
data.tar.xz
26.1 KB
data.tar
6.08 KB
file list
    
Offset 1, 21 lines modifiedOffset 1, 21 lines modified
1 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​1 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​
2 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​2 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​
3 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​3 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​
4 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​4 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​
5 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​5 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​
6 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​49·​2017-​07-​12·​20:​37:​30.​000000·​.​/​usr/​lib/​nodejs/​promise/​index.​js6 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​49·​2017-​07-​12·​20:​37:​30.​000000·​.​/​usr/​lib/​nodejs/​promise/​index.​js
7 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​7 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​
8 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​4854·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​core.​js8 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​4850·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​core.​js
9 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​314·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​done.​js9 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​314·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​done.​js
10 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2670·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​es6-​extensions.​js10 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2669·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​es6-​extensions.​js
11 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​348·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​finally.​js11 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​348·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​finally.​js
12 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​195·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​index.​js12 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​195·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​index.​js
13 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​3271·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​node-​extensions.​js13 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​3271·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​node-​extensions.​js
14 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2886·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​rejection-​tracking.​js14 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2884·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​rejection-​tracking.​js
15 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1393·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​synchronous.​js15 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1393·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​lib/​synchronous.​js
16 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​16 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​
17 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​17 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​
18 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​444·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​.​jshintrc18 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​444·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​.​jshintrc
19 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​39·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​.​npmignore19 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​39·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​.​npmignore
20 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1777·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​.​travis.​yml20 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1777·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​.​travis.​yml
21 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2906·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​CHANGES.​md21 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2906·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​CHANGES.​md
Offset 57, 21 lines modifiedOffset 57, 21 lines modified
57 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​149·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​domain.​js57 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​149·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​domain.​js
58 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​98·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​index.​html58 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​98·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​index.​html
59 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​80·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​infinite.​js59 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·······​80·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​infinite.​js
60 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2768·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​scaffold.​js60 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2768·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​scaffold.​js
61 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​491·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​worker.​js61 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​491·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​node_modules/​asap/​test/​worker.​js
62 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1115·​2017-​07-​12·​20:​37:​30.​000000·​.​/​usr/​lib/​nodejs/​promise/​package.​json62 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1115·​2017-​07-​12·​20:​37:​30.​000000·​.​/​usr/​lib/​nodejs/​promise/​package.​json
63 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​63 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​
64 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​4831·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​core.​js64 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​4827·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​core.​js
65 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​314·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​done.​js65 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​314·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​done.​js
66 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2670·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​es6-​extensions.​js66 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2669·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​es6-​extensions.​js
67 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​348·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​finally.​js67 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​348·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​finally.​js
68 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​195·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​index.​js68 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​195·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​index.​js
69 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​3268·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​node-​extensions.​js69 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​3268·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​node-​extensions.​js
70 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2886·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​rejection-​tracking.​js70 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​2884·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​rejection-​tracking.​js
71 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1393·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​synchronous.​js71 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1393·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​lib/​nodejs/​promise/​setimmediate/​synchronous.​js
72 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​72 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​
73 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​73 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​
74 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​node-​promise/​74 drwxr-​xr-​x···​0·​root·········​(0)​·​root·········​(0)​········​0·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​node-​promise/​
75 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​3447·​2017-​07-​12·​20:​37:​30.​000000·​.​/​usr/​share/​doc/​node-​promise/​Readme.​md.​gz75 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​3447·​2017-​07-​12·​20:​37:​30.​000000·​.​/​usr/​share/​doc/​node-​promise/​Readme.​md.​gz
76 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​295·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​node-​promise/​changelog.​Debian.​gz76 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​······​295·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​node-​promise/​changelog.​Debian.​gz
77 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1663·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​node-​promise/​copyright77 -​rw-​r-​-​r-​-​···​0·​root·········​(0)​·​root·········​(0)​·····​1663·​2018-​01-​03·​12:​57:​52.​000000·​.​/​usr/​share/​doc/​node-​promise/​copyright
4.5 KB
./usr/lib/nodejs/promise/lib/core.js
4.43 KB
js-beautify {}
    
Offset 56, 24 lines modifiedOffset 56, 24 lines modified
56 function·​Promise(fn)​·​{56 function·​Promise(fn)​·​{
57 ····​if·​(typeof·​this·​!==·​'object')​·​{57 ····​if·​(typeof·​this·​!==·​'object')​·​{
58 ········​throw·​new·​TypeError('Promises·​must·​be·​constructed·​via·​new')​;​58 ········​throw·​new·​TypeError('Promises·​must·​be·​constructed·​via·​new')​;​
59 ····​}59 ····​}
60 ····​if·​(typeof·​fn·​!==·​'function')​·​{60 ····​if·​(typeof·​fn·​!==·​'function')​·​{
61 ········​throw·​new·​TypeError('Promise·​constructor\'s·​argument·​is·​not·​a·​function')​;​61 ········​throw·​new·​TypeError('Promise·​constructor\'s·​argument·​is·​not·​a·​function')​;​
62 ····​}62 ····​}
63 ····​this.​_51·​=·​0;​63 ····​this.​_54·​=·​0;​
64 ····​this.​_2·​=·​0;​64 ····​this.​_9·​=·​0;​
65 ····​this.​_54·​=·​null;​65 ····​this.​_59·​=·​null;​
66 ····​this.​_56·​=·​null;​66 ····​this.​_87·​=·​null;​
67 ····​if·​(fn·​===·​noop)​·​return;​67 ····​if·​(fn·​===·​noop)​·​return;​
68 ····​doResolve(fn,​·​this)​;​68 ····​doResolve(fn,​·​this)​;​
69 }69 }
70 Promise.​_97·​=·​null;​70 Promise.​_78·​=·​null;​
71 Promise.​_50·​=·​null;​71 Promise.​_4·​=·​null;​
72 Promise.​_19·​=·​noop;​72 Promise.​_0·​=·​noop;​
  
73 Promise.​prototype.​then·​=·​function(onFulfilled,​·​onRejected)​·​{73 Promise.​prototype.​then·​=·​function(onFulfilled,​·​onRejected)​·​{
74 ····​if·​(this.​constructor·​!==·​Promise)​·​{74 ····​if·​(this.​constructor·​!==·​Promise)​·​{
75 ········​return·​safeThen(this,​·​onFulfilled,​·​onRejected)​;​75 ········​return·​safeThen(this,​·​onFulfilled,​·​onRejected)​;​
76 ····​}76 ····​}
77 ····​var·​res·​=·​new·​Promise(noop)​;​77 ····​var·​res·​=·​new·​Promise(noop)​;​
78 ····​handle(this,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​78 ····​handle(this,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​
Offset 85, 49 lines modifiedOffset 85, 49 lines modified
85 ········​var·​res·​=·​new·​Promise(noop)​;​85 ········​var·​res·​=·​new·​Promise(noop)​;​
86 ········​res.​then(resolve,​·​reject)​;​86 ········​res.​then(resolve,​·​reject)​;​
87 ········​handle(self,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​87 ········​handle(self,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​
88 ····​})​;​88 ····​})​;​
89 }89 }
  
90 function·​handle(self,​·​deferred)​·​{90 function·​handle(self,​·​deferred)​·​{
91 ····​while·​(self.​_2·​===·​3)​·​{91 ····​while·​(self.​_9·​===·​3)​·​{
92 ········​self·​=·​self.​_54;​92 ········​self·​=·​self.​_59;​
93 ····​}93 ····​}
94 ····​if·​(Promise.​_97)​·​{94 ····​if·​(Promise.​_78)​·​{
95 ········​Promise.​_97(self)​;​95 ········​Promise.​_78(self)​;​
96 ····​}96 ····​}
97 ····​if·​(self.​_2·​===·​0)​·​{97 ····​if·​(self.​_9·​===·​0)​·​{
98 ········​if·​(self.​_51·​===·​0)​·​{98 ········​if·​(self.​_54·​===·​0)​·​{
99 ············​self.​_51·​=·​1;​99 ············​self.​_54·​=·​1;​
100 ············​self.​_56·​=·​deferred;​100 ············​self.​_87·​=·​deferred;​
101 ············​return;​101 ············​return;​
102 ········​}102 ········​}
103 ········​if·​(self.​_51·​===·​1)​·​{103 ········​if·​(self.​_54·​===·​1)​·​{
104 ············​self.​_51·​=·​2;​104 ············​self.​_54·​=·​2;​
105 ············​self.​_56·​=·​[self.​_56,​·​deferred];​105 ············​self.​_87·​=·​[self.​_87,​·​deferred];​
106 ············​return;​106 ············​return;​
107 ········​}107 ········​}
108 ········​self.​_56.​push(deferred)​;​108 ········​self.​_87.​push(deferred)​;​
109 ········​return;​109 ········​return;​
110 ····​}110 ····​}
111 ····​handleResolved(self,​·​deferred)​;​111 ····​handleResolved(self,​·​deferred)​;​
112 }112 }
  
113 function·​handleResolved(self,​·​deferred)​·​{113 function·​handleResolved(self,​·​deferred)​·​{
114 ····​asap(function()​·​{114 ····​asap(function()​·​{
115 ········​var·​cb·​=·​self.​_2·​===·​1·​?·​deferred.​onFulfilled·​:​·​deferred.​onRejected;​115 ········​var·​cb·​=·​self.​_9·​===·​1·​?·​deferred.​onFulfilled·​:​·​deferred.​onRejected;​
116 ········​if·​(cb·​===·​null)​·​{116 ········​if·​(cb·​===·​null)​·​{
117 ············​if·​(self.​_2·​===·​1)​·​{117 ············​if·​(self.​_9·​===·​1)​·​{
118 ················​resolve(deferred.​promise,​·​self.​_54)​;​118 ················​resolve(deferred.​promise,​·​self.​_59)​;​
119 ············​}·​else·​{119 ············​}·​else·​{
120 ················​reject(deferred.​promise,​·​self.​_54)​;​120 ················​reject(deferred.​promise,​·​self.​_59)​;​
121 ············​}121 ············​}
122 ············​return;​122 ············​return;​
123 ········​}123 ········​}
124 ········​var·​ret·​=·​tryCallOne(cb,​·​self.​_54)​;​124 ········​var·​ret·​=·​tryCallOne(cb,​·​self.​_59)​;​
125 ········​if·​(ret·​===·​IS_ERROR)​·​{125 ········​if·​(ret·​===·​IS_ERROR)​·​{
126 ············​reject(deferred.​promise,​·​LAST_ERROR)​;​126 ············​reject(deferred.​promise,​·​LAST_ERROR)​;​
127 ········​}·​else·​{127 ········​}·​else·​{
128 ············​resolve(deferred.​promise,​·​ret)​;​128 ············​resolve(deferred.​promise,​·​ret)​;​
129 ········​}129 ········​}
130 ····​})​;​130 ····​})​;​
131 }131 }
Offset 148, 47 lines modifiedOffset 148, 47 lines modified
148 ········​if·​(then·​===·​IS_ERROR)​·​{148 ········​if·​(then·​===·​IS_ERROR)​·​{
149 ············​return·​reject(self,​·​LAST_ERROR)​;​149 ············​return·​reject(self,​·​LAST_ERROR)​;​
150 ········​}150 ········​}
151 ········​if·​(151 ········​if·​(
152 ············​then·​===·​self.​then·​&&152 ············​then·​===·​self.​then·​&&
153 ············​newValue·​instanceof·​Promise153 ············​newValue·​instanceof·​Promise
154 ········​)​·​{154 ········​)​·​{
155 ············​self.​_2·​=·​3;​155 ············​self.​_9·​=·​3;​
156 ············​self.​_54·​=·​newValue;​156 ············​self.​_59·​=·​newValue;​
157 ············​finale(self)​;​157 ············​finale(self)​;​
158 ············​return;​158 ············​return;​
159 ········​}·​else·​if·​(typeof·​then·​===·​'function')​·​{159 ········​}·​else·​if·​(typeof·​then·​===·​'function')​·​{
160 ············​doResolve(then.​bind(newValue)​,​·​self)​;​160 ············​doResolve(then.​bind(newValue)​,​·​self)​;​
161 ············​return;​161 ············​return;​
162 ········​}162 ········​}
163 ····​}163 ····​}
164 ····​self.​_2·​=·​1;​164 ····​self.​_9·​=·​1;​
165 ····​self.​_54·​=·​newValue;​165 ····​self.​_59·​=·​newValue;​
166 ····​finale(self)​;​166 ····​finale(self)​;​
167 }167 }
  
168 function·​reject(self,​·​newValue)​·​{168 function·​reject(self,​·​newValue)​·​{
169 ····​self.​_2·​=·​2;​169 ····​self.​_9·​=·​2;​
170 ····​self.​_54·​=·​newValue;​170 ····​self.​_59·​=·​newValue;​
171 ····​if·​(Promise.​_50)​·​{171 ····​if·​(Promise.​_4)​·​{
172 ········​Promise.​_50(self,​·​newValue)​;​172 ········​Promise.​_4(self,​·​newValue)​;​
173 ····​}173 ····​}
174 ····​finale(self)​;​174 ····​finale(self)​;​
175 }175 }
  
176 function·​finale(self)​·​{176 function·​finale(self)​·​{
177 ····​if·​(self.​_51·​===·​1)​·​{177 ····​if·​(self.​_54·​===·​1)​·​{
178 ········​handle(self,​·​self.​_56)​;​178 ········​handle(self,​·​self.​_87)​;​
179 ········​self.​_56·​=·​null;​179 ········​self.​_87·​=·​null;​
180 ····​}180 ····​}
181 ····​if·​(self.​_51·​===·​2)​·​{181 ····​if·​(self.​_54·​===·​2)​·​{
182 ········​for·​(var·​i·​=·​0;​·​i·​<·​self.​_56.​length;​·​i++)​·​{182 ········​for·​(var·​i·​=·​0;​·​i·​<·​self.​_87.​length;​·​i++)​·​{
183 ············​handle(self,​·​self.​_56[i])​;​183 ············​handle(self,​·​self.​_87[i])​;​
184 ········​}184 ········​}
185 ········​self.​_56·​=·​null;​185 ········​self.​_87·​=·​null;​
186 ····​}186 ····​}
187 }187 }
  
188 function·​Handler(onFulfilled,​·​onRejected,​·​promise)​·​{188 function·​Handler(onFulfilled,​·​onRejected,​·​promise)​·​{
189 ····​this.​onFulfilled·​=·​typeof·​onFulfilled·​===·​'function'·​?·​onFulfilled·​:​·​null;​189 ····​this.​onFulfilled·​=·​typeof·​onFulfilled·​===·​'function'·​?·​onFulfilled·​:​·​null;​
190 ····​this.​onRejected·​=·​typeof·​onRejected·​===·​'function'·​?·​onRejected·​:​·​null;​190 ····​this.​onRejected·​=·​typeof·​onRejected·​===·​'function'·​?·​onRejected·​:​·​null;​
191 ····​this.​promise·​=·​promise;​191 ····​this.​promise·​=·​promise;​
1.71 KB
./usr/lib/nodejs/promise/lib/es6-extensions.js
1.62 KB
js-beautify {}
    
Offset 12, 17 lines modifiedOffset 12, 17 lines modified
12 var·​FALSE·​=·​valuePromise(false)​;​12 var·​FALSE·​=·​valuePromise(false)​;​
13 var·​NULL·​=·​valuePromise(null)​;​13 var·​NULL·​=·​valuePromise(null)​;​
14 var·​UNDEFINED·​=·​valuePromise(undefine​d)​;​14 var·​UNDEFINED·​=·​valuePromise(undefine​d)​;​
15 var·​ZERO·​=·​valuePromise(0)​;​15 var·​ZERO·​=·​valuePromise(0)​;​
16 var·​EMPTYSTRING·​=·​valuePromise('')​;​16 var·​EMPTYSTRING·​=·​valuePromise('')​;​
  
17 function·​valuePromise(value)​·​{17 function·​valuePromise(value)​·​{
18 ····​var·​p·​=·​new·​Promise(Promise.​_19)​;​18 ····​var·​p·​=·​new·​Promise(Promise.​_0)​;​
19 ····​p.​_2·​=·​1;​19 ····​p.​_9·​=·​1;​
20 ····​p.​_54·​=·​value;​20 ····​p.​_59·​=·​value;​
21 ····​return·​p;​21 ····​return·​p;​
22 }22 }
23 Promise.​resolve·​=·​function(value)​·​{23 Promise.​resolve·​=·​function(value)​·​{
24 ····​if·​(value·​instanceof·​Promise)​·​return·​value;​24 ····​if·​(value·​instanceof·​Promise)​·​return·​value;​
  
25 ····​if·​(value·​===·​null)​·​return·​NULL;​25 ····​if·​(value·​===·​null)​·​return·​NULL;​
26 ····​if·​(value·​===·​undefined)​·​return·​UNDEFINED;​26 ····​if·​(value·​===·​undefined)​·​return·​UNDEFINED;​
Offset 52, 19 lines modifiedOffset 52, 19 lines modified
52 ····​return·​new·​Promise(function(reso​lve,​·​reject)​·​{52 ····​return·​new·​Promise(function(reso​lve,​·​reject)​·​{
53 ········​if·​(args.​length·​===·​0)​·​return·​resolve([])​;​53 ········​if·​(args.​length·​===·​0)​·​return·​resolve([])​;​
54 ········​var·​remaining·​=·​args.​length;​54 ········​var·​remaining·​=·​args.​length;​
  
55 ········​function·​res(i,​·​val)​·​{55 ········​function·​res(i,​·​val)​·​{
56 ············​if·​(val·​&&·​(typeof·​val·​===·​'object'·​||·​typeof·​val·​===·​'function')​)​·​{56 ············​if·​(val·​&&·​(typeof·​val·​===·​'object'·​||·​typeof·​val·​===·​'function')​)​·​{
57 ················​if·​(val·​instanceof·​Promise·​&&·​val.​then·​===·​Promise.​prototype.​then)​·​{57 ················​if·​(val·​instanceof·​Promise·​&&·​val.​then·​===·​Promise.​prototype.​then)​·​{
58 ····················​while·​(val.​_2·​===·​3)​·​{58 ····················​while·​(val.​_9·​===·​3)​·​{
59 ························​val·​=·​val.​_54;​59 ························​val·​=·​val.​_59;​
60 ····················​}60 ····················​}
61 ····················​if·​(val.​_2·​===·​1)​·​return·​res(i,​·​val.​_54)​;​61 ····················​if·​(val.​_9·​===·​1)​·​return·​res(i,​·​val.​_59)​;​
62 ····················​if·​(val.​_2·​===·​2)​·​reject(val.​_54)​;​62 ····················​if·​(val.​_9·​===·​2)​·​reject(val.​_59)​;​
63 ····················​val.​then(function(val)​·​{63 ····················​val.​then(function(val)​·​{
64 ························​res(i,​·​val)​;​64 ························​res(i,​·​val)​;​
65 ····················​},​·​reject)​;​65 ····················​},​·​reject)​;​
66 ····················​return;​66 ····················​return;​
67 ················​}·​else·​{67 ················​}·​else·​{
68 ····················​var·​then·​=·​val.​then;​68 ····················​var·​then·​=·​val.​then;​
69 ····················​if·​(typeof·​then·​===·​'function')​·​{69 ····················​if·​(typeof·​then·​===·​'function')​·​{
2.18 KB
./usr/lib/nodejs/promise/lib/rejection-tracking.js
2.08 KB
js-beautify {}
    
Offset 9, 48 lines modifiedOffset 9, 48 lines modified
9 ];​9 ];​
  
10 var·​enabled·​=·​false;​10 var·​enabled·​=·​false;​
11 exports.​disable·​=·​disable;​11 exports.​disable·​=·​disable;​
  
12 function·​disable()​·​{12 function·​disable()​·​{
13 ····​enabled·​=·​false;​13 ····​enabled·​=·​false;​
14 ····​Promise.​_97·​=·​null;​14 ····​Promise.​_78·​=·​null;​
15 ····​Promise.​_50·​=·​null;​15 ····​Promise.​_4·​=·​null;​
16 }16 }
  
17 exports.​enable·​=·​enable;​17 exports.​enable·​=·​enable;​
  
18 function·​enable(options)​·​{18 function·​enable(options)​·​{
19 ····​options·​=·​options·​||·​{};​19 ····​options·​=·​options·​||·​{};​
20 ····​if·​(enabled)​·​disable()​;​20 ····​if·​(enabled)​·​disable()​;​
21 ····​enabled·​=·​true;​21 ····​enabled·​=·​true;​
22 ····​var·​id·​=·​0;​22 ····​var·​id·​=·​0;​
23 ····​var·​displayId·​=·​0;​23 ····​var·​displayId·​=·​0;​
24 ····​var·​rejections·​=·​{};​24 ····​var·​rejections·​=·​{};​
25 ····​Promise.​_97·​=·​function(promise)​·​{25 ····​Promise.​_78·​=·​function(promise)​·​{
26 ········​if·​(26 ········​if·​(
27 ············​promise.​_2·​===·​2·​&&·​/​/​·​IS·​REJECTED27 ············​promise.​_9·​===·​2·​&&·​/​/​·​IS·​REJECTED
28 ············​rejections[promise.​_40]28 ············​rejections[promise.​_12]
29 ········​)​·​{29 ········​)​·​{
30 ············​if·​(rejections[promise.​_40].​logged)​·​{30 ············​if·​(rejections[promise.​_12].​logged)​·​{
31 ················​onHandled(promise.​_40)​;​31 ················​onHandled(promise.​_12)​;​
32 ············​}·​else·​{32 ············​}·​else·​{
33 ················​clearTimeout(rejectio​ns[promise.​_40].​timeout)​;​33 ················​clearTimeout(rejectio​ns[promise.​_12].​timeout)​;​
34 ············​}34 ············​}
35 ············​delete·​rejections[promise.​_40];​35 ············​delete·​rejections[promise.​_12];​
36 ········​}36 ········​}
37 ····​};​37 ····​};​
38 ····​Promise.​_50·​=·​function(promise,​·​err)​·​{38 ····​Promise.​_4·​=·​function(promise,​·​err)​·​{
39 ········​if·​(promise.​_51·​===·​0)​·​{·​/​/​·​not·​yet·​handled39 ········​if·​(promise.​_54·​===·​0)​·​{·​/​/​·​not·​yet·​handled
40 ············​promise.​_40·​=·​id++;​40 ············​promise.​_12·​=·​id++;​
41 ············​rejections[promise.​_40]·​=·​{41 ············​rejections[promise.​_12]·​=·​{
42 ················​displayId:​·​null,​42 ················​displayId:​·​null,​
43 ················​error:​·​err,​43 ················​error:​·​err,​
44 ················​timeout:​·​setTimeout(44 ················​timeout:​·​setTimeout(
45 ····················​onUnhandled.​bind(null,​·​promise.​_40)​,​45 ····················​onUnhandled.​bind(null,​·​promise.​_12)​,​
46 ····················​/​/​·​For·​reference·​errors·​and·​type·​errors,​·​this·​almost·​always46 ····················​/​/​·​For·​reference·​errors·​and·​type·​errors,​·​this·​almost·​always
47 ····················​/​/​·​means·​the·​programmer·​made·​a·​mistake,​·​so·​log·​them·​after·​just47 ····················​/​/​·​means·​the·​programmer·​made·​a·​mistake,​·​so·​log·​them·​after·​just
48 ····················​/​/​·​100ms48 ····················​/​/​·​100ms
49 ····················​/​/​·​otherwise,​·​wait·​2·​seconds·​to·​see·​if·​they·​get·​handled49 ····················​/​/​·​otherwise,​·​wait·​2·​seconds·​to·​see·​if·​they·​get·​handled
50 ····················​matchWhitelist(err,​·​DEFAULT_WHITELIST)​·​?50 ····················​matchWhitelist(err,​·​DEFAULT_WHITELIST)​·​?
51 ····················​100·​:​51 ····················​100·​:​
52 ····················​200052 ····················​2000
1.58 KB
./usr/lib/nodejs/promise/lib/synchronous.js
1.5 KB
js-beautify {}
    
Offset 13, 46 lines modifiedOffset 13, 46 lines modified
13 ····​};​13 ····​};​
  
14 ····​Promise.​prototype.​isRejected·​=·​function()​·​{14 ····​Promise.​prototype.​isRejected·​=·​function()​·​{
15 ········​return·​this.​getState()​·​==·​2;​15 ········​return·​this.​getState()​·​==·​2;​
16 ····​};​16 ····​};​
  
17 ····​Promise.​prototype.​getValue·​=·​function()​·​{17 ····​Promise.​prototype.​getValue·​=·​function()​·​{
18 ········​if·​(this.​_2·​===·​3)​·​{18 ········​if·​(this.​_9·​===·​3)​·​{
19 ············​return·​this.​_54.​getValue()​;​19 ············​return·​this.​_59.​getValue()​;​
20 ········​}20 ········​}
  
21 ········​if·​(!this.​isFulfilled()​)​·​{21 ········​if·​(!this.​isFulfilled()​)​·​{
22 ············​throw·​new·​Error('Cannot·​get·​a·​value·​of·​an·​unfulfilled·​promise.​')​;​22 ············​throw·​new·​Error('Cannot·​get·​a·​value·​of·​an·​unfulfilled·​promise.​')​;​
23 ········​}23 ········​}
  
24 ········​return·​this.​_54;​24 ········​return·​this.​_59;​
25 ····​};​25 ····​};​
  
26 ····​Promise.​prototype.​getReason·​=·​function()​·​{26 ····​Promise.​prototype.​getReason·​=·​function()​·​{
27 ········​if·​(this.​_2·​===·​3)​·​{27 ········​if·​(this.​_9·​===·​3)​·​{
28 ············​return·​this.​_54.​getReason()​;​28 ············​return·​this.​_59.​getReason()​;​
29 ········​}29 ········​}
  
30 ········​if·​(!this.​isRejected()​)​·​{30 ········​if·​(!this.​isRejected()​)​·​{
31 ············​throw·​new·​Error('Cannot·​get·​a·​rejection·​reason·​of·​a·​non-​rejected·​promise.​')​;​31 ············​throw·​new·​Error('Cannot·​get·​a·​rejection·​reason·​of·​a·​non-​rejected·​promise.​')​;​
32 ········​}32 ········​}
  
33 ········​return·​this.​_54;​33 ········​return·​this.​_59;​
34 ····​};​34 ····​};​
  
35 ····​Promise.​prototype.​getState·​=·​function()​·​{35 ····​Promise.​prototype.​getState·​=·​function()​·​{
36 ········​if·​(this.​_2·​===·​3)​·​{36 ········​if·​(this.​_9·​===·​3)​·​{
37 ············​return·​this.​_54.​getState()​;​37 ············​return·​this.​_59.​getState()​;​
38 ········​}38 ········​}
39 ········​if·​(this.​_2·​===·​-​1·​||·​this.​_2·​===·​-​2)​·​{39 ········​if·​(this.​_9·​===·​-​1·​||·​this.​_9·​===·​-​2)​·​{
40 ············​return·​0;​40 ············​return·​0;​
41 ········​}41 ········​}
  
42 ········​return·​this.​_2;​42 ········​return·​this.​_9;​
43 ····​};​43 ····​};​
44 };​44 };​
  
45 Promise.​disableSynchronous·​=·​function()​·​{45 Promise.​disableSynchronous·​=·​function()​·​{
46 ····​Promise.​prototype.​isPending·​=·​undefined;​46 ····​Promise.​prototype.​isPending·​=·​undefined;​
47 ····​Promise.​prototype.​isFulfilled·​=·​undefined;​47 ····​Promise.​prototype.​isFulfilled·​=·​undefined;​
48 ····​Promise.​prototype.​isRejected·​=·​undefined;​48 ····​Promise.​prototype.​isRejected·​=·​undefined;​
4.53 KB
./usr/lib/nodejs/promise/setimmediate/core.js
4.44 KB
js-beautify {}
    
Offset 56, 24 lines modifiedOffset 56, 24 lines modified
56 function·​Promise(fn)​·​{56 function·​Promise(fn)​·​{
57 ····​if·​(typeof·​this·​!==·​'object')​·​{57 ····​if·​(typeof·​this·​!==·​'object')​·​{
58 ········​throw·​new·​TypeError('Promises·​must·​be·​constructed·​via·​new')​;​58 ········​throw·​new·​TypeError('Promises·​must·​be·​constructed·​via·​new')​;​
59 ····​}59 ····​}
60 ····​if·​(typeof·​fn·​!==·​'function')​·​{60 ····​if·​(typeof·​fn·​!==·​'function')​·​{
61 ········​throw·​new·​TypeError('Promise·​constructor\'s·​argument·​is·​not·​a·​function')​;​61 ········​throw·​new·​TypeError('Promise·​constructor\'s·​argument·​is·​not·​a·​function')​;​
62 ····​}62 ····​}
63 ····​this.​_51·​=·​0;​63 ····​this.​_54·​=·​0;​
64 ····​this.​_2·​=·​0;​64 ····​this.​_9·​=·​0;​
65 ····​this.​_54·​=·​null;​65 ····​this.​_59·​=·​null;​
66 ····​this.​_56·​=·​null;​66 ····​this.​_87·​=·​null;​
67 ····​if·​(fn·​===·​noop)​·​return;​67 ····​if·​(fn·​===·​noop)​·​return;​
68 ····​doResolve(fn,​·​this)​;​68 ····​doResolve(fn,​·​this)​;​
69 }69 }
70 Promise.​_97·​=·​null;​70 Promise.​_78·​=·​null;​
71 Promise.​_50·​=·​null;​71 Promise.​_4·​=·​null;​
72 Promise.​_19·​=·​noop;​72 Promise.​_0·​=·​noop;​
  
73 Promise.​prototype.​then·​=·​function(onFulfilled,​·​onRejected)​·​{73 Promise.​prototype.​then·​=·​function(onFulfilled,​·​onRejected)​·​{
74 ····​if·​(this.​constructor·​!==·​Promise)​·​{74 ····​if·​(this.​constructor·​!==·​Promise)​·​{
75 ········​return·​safeThen(this,​·​onFulfilled,​·​onRejected)​;​75 ········​return·​safeThen(this,​·​onFulfilled,​·​onRejected)​;​
76 ····​}76 ····​}
77 ····​var·​res·​=·​new·​Promise(noop)​;​77 ····​var·​res·​=·​new·​Promise(noop)​;​
78 ····​handle(this,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​78 ····​handle(this,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​
Offset 85, 49 lines modifiedOffset 85, 49 lines modified
85 ········​var·​res·​=·​new·​Promise(noop)​;​85 ········​var·​res·​=·​new·​Promise(noop)​;​
86 ········​res.​then(resolve,​·​reject)​;​86 ········​res.​then(resolve,​·​reject)​;​
87 ········​handle(self,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​87 ········​handle(self,​·​new·​Handler(onFulfilled,​·​onRejected,​·​res)​)​;​
88 ····​})​;​88 ····​})​;​
89 }89 }
  
90 function·​handle(self,​·​deferred)​·​{90 function·​handle(self,​·​deferred)​·​{
91 ····​while·​(self.​_2·​===·​3)​·​{91 ····​while·​(self.​_9·​===·​3)​·​{
92 ········​self·​=·​self.​_54;​92 ········​self·​=·​self.​_59;​
93 ····​}93 ····​}
94 ····​if·​(Promise.​_97)​·​{94 ····​if·​(Promise.​_78)​·​{
95 ········​Promise.​_97(self)​;​95 ········​Promise.​_78(self)​;​
96 ····​}96 ····​}
97 ····​if·​(self.​_2·​===·​0)​·​{97 ····​if·​(self.​_9·​===·​0)​·​{
98 ········​if·​(self.​_51·​===·​0)​·​{98 ········​if·​(self.​_54·​===·​0)​·​{
99 ············​self.​_51·​=·​1;​99 ············​self.​_54·​=·​1;​
100 ············​self.​_56·​=·​deferred;​100 ············​self.​_87·​=·​deferred;​
101 ············​return;​101 ············​return;​
102 ········​}102 ········​}
103 ········​if·​(self.​_51·​===·​1)​·​{103 ········​if·​(self.​_54·​===·​1)​·​{
104 ············​self.​_51·​=·​2;​104 ············​self.​_54·​=·​2;​
105 ············​self.​_56·​=·​[self.​_56,​·​deferred];​105 ············​self.​_87·​=·​[self.​_87,​·​deferred];​
106 ············​return;​106 ············​return;​
107 ········​}107 ········​}
108 ········​self.​_56.​push(deferred)​;​108 ········​self.​_87.​push(deferred)​;​
109 ········​return;​109 ········​return;​
110 ····​}110 ····​}
111 ····​handleResolved(self,​·​deferred)​;​111 ····​handleResolved(self,​·​deferred)​;​
112 }112 }
  
113 function·​handleResolved(self,​·​deferred)​·​{113 function·​handleResolved(self,​·​deferred)​·​{
114 ····​setImmediate(function​()​·​{114 ····​setImmediate(function​()​·​{
115 ········​var·​cb·​=·​self.​_2·​===·​1·​?·​deferred.​onFulfilled·​:​·​deferred.​onRejected;​115 ········​var·​cb·​=·​self.​_9·​===·​1·​?·​deferred.​onFulfilled·​:​·​deferred.​onRejected;​
116 ········​if·​(cb·​===·​null)​·​{116 ········​if·​(cb·​===·​null)​·​{
117 ············​if·​(self.​_2·​===·​1)​·​{117 ············​if·​(self.​_9·​===·​1)​·​{
118 ················​resolve(deferred.​promise,​·​self.​_54)​;​118 ················​resolve(deferred.​promise,​·​self.​_59)​;​
119 ············​}·​else·​{119 ············​}·​else·​{
120 ················​reject(deferred.​promise,​·​self.​_54)​;​120 ················​reject(deferred.​promise,​·​self.​_59)​;​
121 ············​}121 ············​}
122 ············​return;​122 ············​return;​
123 ········​}123 ········​}
124 ········​var·​ret·​=·​tryCallOne(cb,​·​self.​_54)​;​124 ········​var·​ret·​=·​tryCallOne(cb,​·​self.​_59)​;​
125 ········​if·​(ret·​===·​IS_ERROR)​·​{125 ········​if·​(ret·​===·​IS_ERROR)​·​{
126 ············​reject(deferred.​promise,​·​LAST_ERROR)​;​126 ············​reject(deferred.​promise,​·​LAST_ERROR)​;​
127 ········​}·​else·​{127 ········​}·​else·​{
128 ············​resolve(deferred.​promise,​·​ret)​;​128 ············​resolve(deferred.​promise,​·​ret)​;​
129 ········​}129 ········​}
130 ····​})​;​130 ····​})​;​
131 }131 }
Offset 148, 47 lines modifiedOffset 148, 47 lines modified
148 ········​if·​(then·​===·​IS_ERROR)​·​{148 ········​if·​(then·​===·​IS_ERROR)​·​{
149 ············​return·​reject(self,​·​LAST_ERROR)​;​149 ············​return·​reject(self,​·​LAST_ERROR)​;​
150 ········​}150 ········​}
151 ········​if·​(151 ········​if·​(
152 ············​then·​===·​self.​then·​&&152 ············​then·​===·​self.​then·​&&
153 ············​newValue·​instanceof·​Promise153 ············​newValue·​instanceof·​Promise
154 ········​)​·​{154 ········​)​·​{
155 ············​self.​_2·​=·​3;​155 ············​self.​_9·​=·​3;​
156 ············​self.​_54·​=·​newValue;​156 ············​self.​_59·​=·​newValue;​
157 ············​finale(self)​;​157 ············​finale(self)​;​
158 ············​return;​158 ············​return;​
159 ········​}·​else·​if·​(typeof·​then·​===·​'function')​·​{159 ········​}·​else·​if·​(typeof·​then·​===·​'function')​·​{
160 ············​doResolve(then.​bind(newValue)​,​·​self)​;​160 ············​doResolve(then.​bind(newValue)​,​·​self)​;​
161 ············​return;​161 ············​return;​
162 ········​}162 ········​}
163 ····​}163 ····​}
164 ····​self.​_2·​=·​1;​164 ····​self.​_9·​=·​1;​
165 ····​self.​_54·​=·​newValue;​165 ····​self.​_59·​=·​newValue;​
166 ····​finale(self)​;​166 ····​finale(self)​;​
167 }167 }
  
168 function·​reject(self,​·​newValue)​·​{168 function·​reject(self,​·​newValue)​·​{
169 ····​self.​_2·​=·​2;​169 ····​self.​_9·​=·​2;​
170 ····​self.​_54·​=·​newValue;​170 ····​self.​_59·​=·​newValue;​
171 ····​if·​(Promise.​_50)​·​{171 ····​if·​(Promise.​_4)​·​{
172 ········​Promise.​_50(self,​·​newValue)​;​172 ········​Promise.​_4(self,​·​newValue)​;​
173 ····​}173 ····​}
174 ····​finale(self)​;​174 ····​finale(self)​;​
175 }175 }
  
176 function·​finale(self)​·​{176 function·​finale(self)​·​{
177 ····​if·​(self.​_51·​===·​1)​·​{177 ····​if·​(self.​_54·​===·​1)​·​{
178 ········​handle(self,​·​self.​_56)​;​178 ········​handle(self,​·​self.​_87)​;​
179 ········​self.​_56·​=·​null;​179 ········​self.​_87·​=·​null;​
180 ····​}180 ····​}
181 ····​if·​(self.​_51·​===·​2)​·​{181 ····​if·​(self.​_54·​===·​2)​·​{
182 ········​for·​(var·​i·​=·​0;​·​i·​<·​self.​_56.​length;​·​i++)​·​{182 ········​for·​(var·​i·​=·​0;​·​i·​<·​self.​_87.​length;​·​i++)​·​{
183 ············​handle(self,​·​self.​_56[i])​;​183 ············​handle(self,​·​self.​_87[i])​;​
184 ········​}184 ········​}
185 ········​self.​_56·​=·​null;​185 ········​self.​_87·​=·​null;​
186 ····​}186 ····​}
187 }187 }
  
188 function·​Handler(onFulfilled,​·​onRejected,​·​promise)​·​{188 function·​Handler(onFulfilled,​·​onRejected,​·​promise)​·​{
189 ····​this.​onFulfilled·​=·​typeof·​onFulfilled·​===·​'function'·​?·​onFulfilled·​:​·​null;​189 ····​this.​onFulfilled·​=·​typeof·​onFulfilled·​===·​'function'·​?·​onFulfilled·​:​·​null;​
190 ····​this.​onRejected·​=·​typeof·​onRejected·​===·​'function'·​?·​onRejected·​:​·​null;​190 ····​this.​onRejected·​=·​typeof·​onRejected·​===·​'function'·​?·​onRejected·​:​·​null;​
191 ····​this.​promise·​=·​promise;​191 ····​this.​promise·​=·​promise;​
1.73 KB
./usr/lib/nodejs/promise/setimmediate/es6-extensions.js
1.62 KB
js-beautify {}
    
Offset 12, 17 lines modifiedOffset 12, 17 lines modified
12 var·​FALSE·​=·​valuePromise(false)​;​12 var·​FALSE·​=·​valuePromise(false)​;​
13 var·​NULL·​=·​valuePromise(null)​;​13 var·​NULL·​=·​valuePromise(null)​;​
14 var·​UNDEFINED·​=·​valuePromise(undefine​d)​;​14 var·​UNDEFINED·​=·​valuePromise(undefine​d)​;​
15 var·​ZERO·​=·​valuePromise(0)​;​15 var·​ZERO·​=·​valuePromise(0)​;​
16 var·​EMPTYSTRING·​=·​valuePromise('')​;​16 var·​EMPTYSTRING·​=·​valuePromise('')​;​
  
17 function·​valuePromise(value)​·​{17 function·​valuePromise(value)​·​{
18 ····​var·​p·​=·​new·​Promise(Promise.​_19)​;​18 ····​var·​p·​=·​new·​Promise(Promise.​_0)​;​
19 ····​p.​_2·​=·​1;​19 ····​p.​_9·​=·​1;​
20 ····​p.​_54·​=·​value;​20 ····​p.​_59·​=·​value;​
21 ····​return·​p;​21 ····​return·​p;​
22 }22 }
23 Promise.​resolve·​=·​function(value)​·​{23 Promise.​resolve·​=·​function(value)​·​{
24 ····​if·​(value·​instanceof·​Promise)​·​return·​value;​24 ····​if·​(value·​instanceof·​Promise)​·​return·​value;​
  
25 ····​if·​(value·​===·​null)​·​return·​NULL;​25 ····​if·​(value·​===·​null)​·​return·​NULL;​
26 ····​if·​(value·​===·​undefined)​·​return·​UNDEFINED;​26 ····​if·​(value·​===·​undefined)​·​return·​UNDEFINED;​
Offset 52, 19 lines modifiedOffset 52, 19 lines modified
52 ····​return·​new·​Promise(function(reso​lve,​·​reject)​·​{52 ····​return·​new·​Promise(function(reso​lve,​·​reject)​·​{
53 ········​if·​(args.​length·​===·​0)​·​return·​resolve([])​;​53 ········​if·​(args.​length·​===·​0)​·​return·​resolve([])​;​
54 ········​var·​remaining·​=·​args.​length;​54 ········​var·​remaining·​=·​args.​length;​
  
55 ········​function·​res(i,​·​val)​·​{55 ········​function·​res(i,​·​val)​·​{
56 ············​if·​(val·​&&·​(typeof·​val·​===·​'object'·​||·​typeof·​val·​===·​'function')​)​·​{56 ············​if·​(val·​&&·​(typeof·​val·​===·​'object'·​||·​typeof·​val·​===·​'function')​)​·​{
57 ················​if·​(val·​instanceof·​Promise·​&&·​val.​then·​===·​Promise.​prototype.​then)​·​{57 ················​if·​(val·​instanceof·​Promise·​&&·​val.​then·​===·​Promise.​prototype.​then)​·​{
58 ····················​while·​(val.​_2·​===·​3)​·​{58 ····················​while·​(val.​_9·​===·​3)​·​{
59 ························​val·​=·​val.​_54;​59 ························​val·​=·​val.​_59;​
60 ····················​}60 ····················​}
61 ····················​if·​(val.​_2·​===·​1)​·​return·​res(i,​·​val.​_54)​;​61 ····················​if·​(val.​_9·​===·​1)​·​return·​res(i,​·​val.​_59)​;​
62 ····················​if·​(val.​_2·​===·​2)​·​reject(val.​_54)​;​62 ····················​if·​(val.​_9·​===·​2)​·​reject(val.​_59)​;​
63 ····················​val.​then(function(val)​·​{63 ····················​val.​then(function(val)​·​{
64 ························​res(i,​·​val)​;​64 ························​res(i,​·​val)​;​
65 ····················​},​·​reject)​;​65 ····················​},​·​reject)​;​
66 ····················​return;​66 ····················​return;​
67 ················​}·​else·​{67 ················​}·​else·​{
68 ····················​var·​then·​=·​val.​then;​68 ····················​var·​then·​=·​val.​then;​
69 ····················​if·​(typeof·​then·​===·​'function')​·​{69 ····················​if·​(typeof·​then·​===·​'function')​·​{
2.2 KB
./usr/lib/nodejs/promise/setimmediate/rejection-tracking.js
2.08 KB
js-beautify {}
    
Offset 9, 48 lines modifiedOffset 9, 48 lines modified
9 ];​9 ];​
  
10 var·​enabled·​=·​false;​10 var·​enabled·​=·​false;​
11 exports.​disable·​=·​disable;​11 exports.​disable·​=·​disable;​
  
12 function·​disable()​·​{12 function·​disable()​·​{
13 ····​enabled·​=·​false;​13 ····​enabled·​=·​false;​
14 ····​Promise.​_97·​=·​null;​14 ····​Promise.​_78·​=·​null;​
15 ····​Promise.​_50·​=·​null;​15 ····​Promise.​_4·​=·​null;​
16 }16 }
  
17 exports.​enable·​=·​enable;​17 exports.​enable·​=·​enable;​
  
18 function·​enable(options)​·​{18 function·​enable(options)​·​{
19 ····​options·​=·​options·​||·​{};​19 ····​options·​=·​options·​||·​{};​
20 ····​if·​(enabled)​·​disable()​;​20 ····​if·​(enabled)​·​disable()​;​
21 ····​enabled·​=·​true;​21 ····​enabled·​=·​true;​
22 ····​var·​id·​=·​0;​22 ····​var·​id·​=·​0;​
23 ····​var·​displayId·​=·​0;​23 ····​var·​displayId·​=·​0;​
24 ····​var·​rejections·​=·​{};​24 ····​var·​rejections·​=·​{};​
25 ····​Promise.​_97·​=·​function(promise)​·​{25 ····​Promise.​_78·​=·​function(promise)​·​{
26 ········​if·​(26 ········​if·​(
27 ············​promise.​_2·​===·​2·​&&·​/​/​·​IS·​REJECTED27 ············​promise.​_9·​===·​2·​&&·​/​/​·​IS·​REJECTED
28 ············​rejections[promise.​_40]28 ············​rejections[promise.​_12]
29 ········​)​·​{29 ········​)​·​{
30 ············​if·​(rejections[promise.​_40].​logged)​·​{30 ············​if·​(rejections[promise.​_12].​logged)​·​{
31 ················​onHandled(promise.​_40)​;​31 ················​onHandled(promise.​_12)​;​
32 ············​}·​else·​{32 ············​}·​else·​{
33 ················​clearTimeout(rejectio​ns[promise.​_40].​timeout)​;​33 ················​clearTimeout(rejectio​ns[promise.​_12].​timeout)​;​
34 ············​}34 ············​}
35 ············​delete·​rejections[promise.​_40];​35 ············​delete·​rejections[promise.​_12];​
36 ········​}36 ········​}
37 ····​};​37 ····​};​
38 ····​Promise.​_50·​=·​function(promise,​·​err)​·​{38 ····​Promise.​_4·​=·​function(promise,​·​err)​·​{
39 ········​if·​(promise.​_51·​===·​0)​·​{·​/​/​·​not·​yet·​handled39 ········​if·​(promise.​_54·​===·​0)​·​{·​/​/​·​not·​yet·​handled
40 ············​promise.​_40·​=·​id++;​40 ············​promise.​_12·​=·​id++;​
41 ············​rejections[promise.​_40]·​=·​{41 ············​rejections[promise.​_12]·​=·​{
42 ················​displayId:​·​null,​42 ················​displayId:​·​null,​
43 ················​error:​·​err,​43 ················​error:​·​err,​
44 ················​timeout:​·​setTimeout(44 ················​timeout:​·​setTimeout(
45 ····················​onUnhandled.​bind(null,​·​promise.​_40)​,​45 ····················​onUnhandled.​bind(null,​·​promise.​_12)​,​
46 ····················​/​/​·​For·​reference·​errors·​and·​type·​errors,​·​this·​almost·​always46 ····················​/​/​·​For·​reference·​errors·​and·​type·​errors,​·​this·​almost·​always
47 ····················​/​/​·​means·​the·​programmer·​made·​a·​mistake,​·​so·​log·​them·​after·​just47 ····················​/​/​·​means·​the·​programmer·​made·​a·​mistake,​·​so·​log·​them·​after·​just
48 ····················​/​/​·​100ms48 ····················​/​/​·​100ms
49 ····················​/​/​·​otherwise,​·​wait·​2·​seconds·​to·​see·​if·​they·​get·​handled49 ····················​/​/​·​otherwise,​·​wait·​2·​seconds·​to·​see·​if·​they·​get·​handled
50 ····················​matchWhitelist(err,​·​DEFAULT_WHITELIST)​·​?50 ····················​matchWhitelist(err,​·​DEFAULT_WHITELIST)​·​?
51 ····················​100·​:​51 ····················​100·​:​
52 ····················​200052 ····················​2000
1.6 KB
./usr/lib/nodejs/promise/setimmediate/synchronous.js
1.5 KB
js-beautify {}
    
Offset 13, 46 lines modifiedOffset 13, 46 lines modified
13 ····​};​13 ····​};​
  
14 ····​Promise.​prototype.​isRejected·​=·​function()​·​{14 ····​Promise.​prototype.​isRejected·​=·​function()​·​{
15 ········​return·​this.​getState()​·​==·​2;​15 ········​return·​this.​getState()​·​==·​2;​
16 ····​};​16 ····​};​
  
17 ····​Promise.​prototype.​getValue·​=·​function()​·​{17 ····​Promise.​prototype.​getValue·​=·​function()​·​{
18 ········​if·​(this.​_2·​===·​3)​·​{18 ········​if·​(this.​_9·​===·​3)​·​{
19 ············​return·​this.​_54.​getValue()​;​19 ············​return·​this.​_59.​getValue()​;​
20 ········​}20 ········​}
  
21 ········​if·​(!this.​isFulfilled()​)​·​{21 ········​if·​(!this.​isFulfilled()​)​·​{
22 ············​throw·​new·​Error('Cannot·​get·​a·​value·​of·​an·​unfulfilled·​promise.​')​;​22 ············​throw·​new·​Error('Cannot·​get·​a·​value·​of·​an·​unfulfilled·​promise.​')​;​
23 ········​}23 ········​}
  
24 ········​return·​this.​_54;​24 ········​return·​this.​_59;​
25 ····​};​25 ····​};​
  
26 ····​Promise.​prototype.​getReason·​=·​function()​·​{26 ····​Promise.​prototype.​getReason·​=·​function()​·​{
27 ········​if·​(this.​_2·​===·​3)​·​{27 ········​if·​(this.​_9·​===·​3)​·​{
28 ············​return·​this.​_54.​getReason()​;​28 ············​return·​this.​_59.​getReason()​;​
29 ········​}29 ········​}
  
30 ········​if·​(!this.​isRejected()​)​·​{30 ········​if·​(!this.​isRejected()​)​·​{
31 ············​throw·​new·​Error('Cannot·​get·​a·​rejection·​reason·​of·​a·​non-​rejected·​promise.​')​;​31 ············​throw·​new·​Error('Cannot·​get·​a·​rejection·​reason·​of·​a·​non-​rejected·​promise.​')​;​
32 ········​}32 ········​}
  
33 ········​return·​this.​_54;​33 ········​return·​this.​_59;​
34 ····​};​34 ····​};​
  
35 ····​Promise.​prototype.​getState·​=·​function()​·​{35 ····​Promise.​prototype.​getState·​=·​function()​·​{
36 ········​if·​(this.​_2·​===·​3)​·​{36 ········​if·​(this.​_9·​===·​3)​·​{
37 ············​return·​this.​_54.​getState()​;​37 ············​return·​this.​_59.​getState()​;​
38 ········​}38 ········​}
39 ········​if·​(this.​_2·​===·​-​1·​||·​this.​_2·​===·​-​2)​·​{39 ········​if·​(this.​_9·​===·​-​1·​||·​this.​_9·​===·​-​2)​·​{
40 ············​return·​0;​40 ············​return·​0;​
41 ········​}41 ········​}
  
42 ········​return·​this.​_2;​42 ········​return·​this.​_9;​
43 ····​};​43 ····​};​
44 };​44 };​
  
45 Promise.​disableSynchronous·​=·​function()​·​{45 Promise.​disableSynchronous·​=·​function()​·​{
46 ····​Promise.​prototype.​isPending·​=·​undefined;​46 ····​Promise.​prototype.​isPending·​=·​undefined;​
47 ····​Promise.​prototype.​isFulfilled·​=·​undefined;​47 ····​Promise.​prototype.​isFulfilled·​=·​undefined;​
48 ····​Promise.​prototype.​isRejected·​=·​undefined;​48 ····​Promise.​prototype.​isRejected·​=·​undefined;​