@@ -283,7 +283,7 @@ class ContextifyContext {
283283 env->context (),
284284 env->contextify_private_symbol ()).FromJust ());
285285
286- TryCatch try_catch;
286+ TryCatch try_catch (env-> isolate ()) ;
287287 ContextifyContext* context = new ContextifyContext (env, sandbox);
288288
289289 if (try_catch.HasCaught ()) {
@@ -493,7 +493,7 @@ class ContextifyScript : public BaseObject {
493493 ContextifyScript* contextify_script =
494494 new ContextifyScript (env, args.This ());
495495
496- TryCatch try_catch;
496+ TryCatch try_catch (env-> isolate ()) ;
497497 Local<String> code = args[0 ]->ToString (env->isolate ());
498498 Local<String> filename = GetFilenameArg (args, 1 );
499499 Local<Integer> lineOffset = GetLineOffsetArg (args, 1 );
@@ -569,7 +569,7 @@ class ContextifyScript : public BaseObject {
569569 // args: [options]
570570 static void RunInThisContext (const FunctionCallbackInfo<Value>& args) {
571571 // Assemble arguments
572- TryCatch try_catch;
572+ TryCatch try_catch (args. GetIsolate ()) ;
573573 uint64_t timeout = GetTimeoutArg (args, 0 );
574574 bool display_errors = GetDisplayErrorsArg (args, 0 );
575575 if (try_catch.HasCaught ()) {
@@ -597,7 +597,7 @@ class ContextifyScript : public BaseObject {
597597
598598 Local<Object> sandbox = args[0 ].As <Object>();
599599 {
600- TryCatch try_catch;
600+ TryCatch try_catch (env-> isolate ()) ;
601601 timeout = GetTimeoutArg (args, 1 );
602602 display_errors = GetDisplayErrorsArg (args, 1 );
603603 if (try_catch.HasCaught ()) {
@@ -618,7 +618,7 @@ class ContextifyScript : public BaseObject {
618618 return ;
619619
620620 {
621- TryCatch try_catch;
621+ TryCatch try_catch (env-> isolate ()) ;
622622 // Do the eval within the context
623623 Context::Scope context_scope (contextify_context->context ());
624624 if (EvalMachine (contextify_context->env (),
0 commit comments