@@ -283,7 +283,7 @@ class ContextifyContext {
283
283
env->context (),
284
284
env->contextify_private_symbol ()).FromJust ());
285
285
286
- TryCatch try_catch;
286
+ TryCatch try_catch (env-> isolate ()) ;
287
287
ContextifyContext* context = new ContextifyContext (env, sandbox);
288
288
289
289
if (try_catch.HasCaught ()) {
@@ -493,7 +493,7 @@ class ContextifyScript : public BaseObject {
493
493
ContextifyScript* contextify_script =
494
494
new ContextifyScript (env, args.This ());
495
495
496
- TryCatch try_catch;
496
+ TryCatch try_catch (env-> isolate ()) ;
497
497
Local<String> code = args[0 ]->ToString (env->isolate ());
498
498
Local<String> filename = GetFilenameArg (args, 1 );
499
499
Local<Integer> lineOffset = GetLineOffsetArg (args, 1 );
@@ -569,7 +569,7 @@ class ContextifyScript : public BaseObject {
569
569
// args: [options]
570
570
static void RunInThisContext (const FunctionCallbackInfo<Value>& args) {
571
571
// Assemble arguments
572
- TryCatch try_catch;
572
+ TryCatch try_catch (args. GetIsolate ()) ;
573
573
uint64_t timeout = GetTimeoutArg (args, 0 );
574
574
bool display_errors = GetDisplayErrorsArg (args, 0 );
575
575
if (try_catch.HasCaught ()) {
@@ -597,7 +597,7 @@ class ContextifyScript : public BaseObject {
597
597
598
598
Local<Object> sandbox = args[0 ].As <Object>();
599
599
{
600
- TryCatch try_catch;
600
+ TryCatch try_catch (env-> isolate ()) ;
601
601
timeout = GetTimeoutArg (args, 1 );
602
602
display_errors = GetDisplayErrorsArg (args, 1 );
603
603
if (try_catch.HasCaught ()) {
@@ -618,7 +618,7 @@ class ContextifyScript : public BaseObject {
618
618
return ;
619
619
620
620
{
621
- TryCatch try_catch;
621
+ TryCatch try_catch (env-> isolate ()) ;
622
622
// Do the eval within the context
623
623
Context::Scope context_scope (contextify_context->context ());
624
624
if (EvalMachine (contextify_context->env (),
0 commit comments