Revert of Avoid Context::Enter and Context::Exit if we're reentering the active and last entered context (patchset #2 id:20001 of https://codereview.chromium.org/2131483002/ )
Reason for revert: crashes: crbug.com/626719 Original issue's description: > Avoid Context::Enter and Context::Exit if we're reentering the active and last entered context > > A bit of browsing around indicates that the new fast-path is taken most of the time: > 3496 Entering new > 152295 Reentering same > > BUG= > > Committed: https://crrev.com/1829eb661ef1cf432fb551bcb193f521a219d490 > Cr-Commit-Position: refs/heads/master@{#37570} TBR=jochen@chromium.org,verwaest@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG= Review-Url: https://codereview.chromium.org/2140563002 Cr-Commit-Position: refs/heads/master@{#37632}
This commit is contained in:
parent
be5808bff8
commit
bec49a4876
12
src/api.cc
12
src/api.cc
@ -183,17 +183,7 @@ class CallDepthScope {
|
||||
DCHECK(!isolate_->external_caught_exception());
|
||||
isolate_->IncrementJsCallsFromApiCounter();
|
||||
isolate_->handle_scope_implementer()->IncrementCallDepth();
|
||||
if (!context.IsEmpty()) {
|
||||
i::Handle<i::Context> env = Utils::OpenHandle(*context);
|
||||
i::HandleScopeImplementer* impl = isolate->handle_scope_implementer();
|
||||
if (isolate->context() != nullptr &&
|
||||
isolate->context()->native_context() == env->native_context() &&
|
||||
impl->LastEnteredContextWas(env)) {
|
||||
context_ = Local<Context>();
|
||||
} else {
|
||||
context_->Enter();
|
||||
}
|
||||
}
|
||||
if (!context_.IsEmpty()) context_->Enter();
|
||||
if (do_callback_) isolate_->FireBeforeCallEnteredCallback();
|
||||
}
|
||||
~CallDepthScope() {
|
||||
|
Loading…
Reference in New Issue
Block a user