File tree Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ exports.SerializedRunner = class SerializedRunner {
77
88 run ( ...args ) {
99 if ( ! this . _pending ) { // prevent concurrent execution
10- this . _pending = augment ( this . asyncOp ( ...args ) ) .
10+ this . _pending = this . asyncOp ( ...args ) .
1111 finally ( ( ) => {
1212 this . _pending = null ;
1313 } ) ;
@@ -24,7 +24,7 @@ exports.SerializedRunner = class SerializedRunner {
2424 let enqueue = this . _pending ;
2525 let res = this . run ( ...args ) ;
2626 if ( enqueue ) {
27- this . _queued = res = augment ( res ) .
27+ this . _queued = res = res .
2828 finally ( ( ) => {
2929 this . _queued = null ;
3030 } ) .
@@ -33,20 +33,3 @@ exports.SerializedRunner = class SerializedRunner {
3333 return res ;
3434 }
3535} ;
36-
37- function augment ( promise ) {
38- promise . finally = always ;
39- return promise ;
40- }
41-
42- // poor man's `Promise#finally` polyfill
43- function always ( fn ) {
44- return this .
45- then ( res => {
46- fn ( ) ;
47- return res ;
48- } , err => {
49- fn ( ) ;
50- throw err ;
51- } ) ;
52- }
You can’t perform that action at this time.
0 commit comments