File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -852,7 +852,6 @@ void ContextifyScript::RunInContext(const FunctionCallbackInfo<Value>& args) {
852
852
CHECK (args[0 ]->IsObject () || args[0 ]->IsNull ());
853
853
854
854
Local<Context> context;
855
- Environment* eval_env = nullptr ;
856
855
std::shared_ptr<v8::MicrotaskQueue> microtask_queue;
857
856
858
857
if (args[0 ]->IsObject ()) {
@@ -861,14 +860,13 @@ void ContextifyScript::RunInContext(const FunctionCallbackInfo<Value>& args) {
861
860
ContextifyContext* contextify_context =
862
861
ContextifyContext::ContextFromContextifiedSandbox (env, sandbox);
863
862
CHECK_NOT_NULL (contextify_context);
863
+ CHECK_EQ (contextify_context->env (), env);
864
864
865
865
context = contextify_context->context ();
866
866
if (context.IsEmpty ()) return ;
867
867
868
- eval_env = contextify_context->env ();
869
868
microtask_queue = contextify_context->microtask_queue ();
870
869
} else {
871
- eval_env = env;
872
870
context = env->context ();
873
871
}
874
872
@@ -888,7 +886,7 @@ void ContextifyScript::RunInContext(const FunctionCallbackInfo<Value>& args) {
888
886
889
887
// Do the eval within the context
890
888
Context::Scope context_scope (context);
891
- EvalMachine (eval_env ,
889
+ EvalMachine (env ,
892
890
timeout,
893
891
display_errors,
894
892
break_on_sigint,
You can’t perform that action at this time.
0 commit comments