File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,21 @@ const realRunInContext = Script.prototype.runInContext;
18
18
19
19
Script . prototype . runInThisContext = function ( options ) {
20
20
if ( options && options . breakOnSigint ) {
21
- return sigintHandlersWrap ( ( ) => {
21
+ const realRunInThisContextScript = ( ) => {
22
22
return realRunInThisContext . call ( this , options ) ;
23
- } ) ;
23
+ } ;
24
+ return sigintHandlersWrap ( realRunInThisContextScript ) ;
24
25
} else {
25
26
return realRunInThisContext . call ( this , options ) ;
26
27
}
27
28
} ;
28
29
29
30
Script . prototype . runInContext = function ( contextifiedSandbox , options ) {
30
31
if ( options && options . breakOnSigint ) {
31
- return sigintHandlersWrap ( ( ) => {
32
+ const realRunInContextScript = ( ) => {
32
33
return realRunInContext . call ( this , contextifiedSandbox , options ) ;
33
- } ) ;
34
+ } ;
35
+ return sigintHandlersWrap ( realRunInContextScript ) ;
34
36
} else {
35
37
return realRunInContext . call ( this , contextifiedSandbox , options ) ;
36
38
}
You can’t perform that action at this time.
0 commit comments