Commit 6751db26 authored by Anna Henningsen's avatar Anna Henningsen Committed by Commit Bot

[debug] allow JS execution in `ProcessCompileEvent` callbacks

In Debug mode, V8 disallows executing JavaScript during
`ScriptCompiler::CompileUnbound()` calls. This restriction
makes sense during compilation, but not really for the post-compile
notification, and currently at least one Node.js test
(`test/inspector/test-contexts.js`) fails because of this in debug mode.

Bug: 
Change-Id: I930b5f06083c0e87f1613414da3dfe2bcdf0f386
Reviewed-on: https://chromium-review.googlesource.com/706943Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48421}
parent ce1104cb
...@@ -1886,6 +1886,7 @@ void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { ...@@ -1886,6 +1886,7 @@ void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) {
HandleScope scope(isolate_); HandleScope scope(isolate_);
PostponeInterruptsScope postpone(isolate_); PostponeInterruptsScope postpone(isolate_);
DisableBreak no_recursive_break(this); DisableBreak no_recursive_break(this);
AllowJavascriptExecution allow_script(isolate_);
debug_delegate_->ScriptCompiled(ToApiHandle<debug::Script>(script), debug_delegate_->ScriptCompiled(ToApiHandle<debug::Script>(script),
live_edit_enabled(), live_edit_enabled(),
event != v8::AfterCompile); event != v8::AfterCompile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment