Skip to content

Commit

Permalink
[debug] allow JS execution in ProcessCompileEvent callbacks
Browse files Browse the repository at this point in the history
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/706943
Reviewed-by: Yang Guo <[email protected]>
Commit-Queue: Yang Guo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#48421}
  • Loading branch information
addaleax authored and Commit Bot committed Oct 10, 2017
1 parent ce1104c commit 6751db2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/debug/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1886,6 +1886,7 @@ void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) {
HandleScope scope(isolate_);
PostponeInterruptsScope postpone(isolate_);
DisableBreak no_recursive_break(this);
AllowJavascriptExecution allow_script(isolate_);
debug_delegate_->ScriptCompiled(ToApiHandle<debug::Script>(script),
live_edit_enabled(),
event != v8::AfterCompile);
Expand Down

0 comments on commit 6751db2

Please sign in to comment.