@@ -445,23 +445,11 @@ Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase)
445445 return Worker . convert ( returnVal , self . __proto__ ) ;
446446} ;
447447
448- Worker . prototype [ 'catch' ] = function ( onRejected ) {
449- // Bind `this` to the promise handler, call `catch`, and return a Worker.
450- if ( onRejected ) { onRejected = onRejected . bind ( this ) ; }
451- var returnVal = Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
452- return Worker . convert ( returnVal , this ) ;
453- } ;
454-
455448Worker . prototype . thenExternal = function thenExternal ( onFulfilled , onRejected ) {
456449 // Call `then` and return a standard promise (exits the Worker chain).
457450 return Promise . prototype . then . call ( this , onFulfilled , onRejected ) ;
458451} ;
459452
460- Worker . prototype . catchExternal = function catchExternal ( onRejected ) {
461- // Call `catch` and return a standard promise (exits the Worker chain).
462- return Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
463- } ;
464-
465453Worker . prototype . thenList = function thenList ( fns ) {
466454 // Queue a series of promise 'factories' into the promise chain.
467455 var self = this ;
@@ -471,6 +459,18 @@ Worker.prototype.thenList = function thenList(fns) {
471459 return self ;
472460} ;
473461
462+ Worker . prototype [ 'catch' ] = function ( onRejected ) {
463+ // Bind `this` to the promise handler, call `catch`, and return a Worker.
464+ if ( onRejected ) { onRejected = onRejected . bind ( this ) ; }
465+ var returnVal = Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
466+ return Worker . convert ( returnVal , this ) ;
467+ } ;
468+
469+ Worker . prototype . catchExternal = function catchExternal ( onRejected ) {
470+ // Call `catch` and return a standard promise (exits the Worker chain).
471+ return Promise . prototype [ 'catch' ] . call ( this , onRejected ) ;
472+ } ;
473+
474474Worker . prototype . error = function error ( msg ) {
475475 // Throw the error in the Promise chain.
476476 return this . then ( function error_main ( ) {
0 commit comments