@@ -1137,22 +1137,26 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
11371137 }
11381138
11391139 pub fn call (self : * const Callback , args : anytype ) ! void {
1140- // const v8 = @import("v8");
11411140 var temp_scope : v8.HandleScope = undefined ;
11421141 v8 .HandleScope .init (& temp_scope , self .executor .isolate );
11431142 defer temp_scope .deinit ();
1143+
11441144 return self .callWithThis (self .getThis (), args );
11451145 }
11461146
11471147 pub fn tryCall (self : * const Callback , args : anytype , result : * Result ) ! void {
1148- // const v8 = @import("v8");
11491148 var temp_scope : v8.HandleScope = undefined ;
11501149 v8 .HandleScope .init (& temp_scope , self .executor .isolate );
11511150 defer temp_scope .deinit ();
1151+
11521152 return self .tryCallWithThis (self .getThis (), args , result );
11531153 }
11541154
11551155 pub fn tryCallWithThis (self : * const Callback , this : anytype , args : anytype , result : * Result ) ! void {
1156+ var temp_scope : v8.HandleScope = undefined ;
1157+ v8 .HandleScope .init (& temp_scope , self .executor .isolate );
1158+ defer temp_scope .deinit ();
1159+
11561160 var try_catch : TryCatch = undefined ;
11571161 try_catch .init (self .executor );
11581162 defer try_catch .deinit ();
@@ -1171,6 +1175,10 @@ pub fn Env(comptime S: type, comptime types: anytype) type {
11711175 }
11721176
11731177 pub fn callWithThis (self : * const Callback , this : anytype , args : anytype ) ! void {
1178+ var temp_scope : v8.HandleScope = undefined ;
1179+ v8 .HandleScope .init (& temp_scope , self .executor .isolate );
1180+ defer temp_scope .deinit ();
1181+
11741182 const executor = self .executor ;
11751183
11761184 const js_this = try executor .valueToExistingObject (this );
0 commit comments