Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Unified Diff: src/isolate.cc

Issue 2155503004: Reland^2 "Don't compile functions in a context the caller doesn't have access to" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index e20cd1a6ef4169598d8f47a4b93097c8d15d4eb9..ddd90b5a275077e8f5571168987656eac144dfbb 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -2887,10 +2887,13 @@ void Isolate::RunMicrotasksInternal() {
Handle<JSFunction>::cast(microtask);
SaveContext save(this);
set_context(microtask_function->context()->native_context());
+ handle_scope_implementer_->EnterMicrotaskContext(
+ handle(microtask_function->context(), this));
MaybeHandle<Object> maybe_exception;
MaybeHandle<Object> result = Execution::TryCall(
this, microtask_function, factory()->undefined_value(), 0, NULL,
&maybe_exception);
+ handle_scope_implementer_->LeaveMicrotaskContext();
// If execution is terminating, just bail out.
Handle<Object> exception;
if (result.is_null() && maybe_exception.is_null()) {
« src/api.cc ('K') | « src/flag-definitions.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698