Commit 300f4413 authored by jgruber's avatar jgruber Committed by Commit bot

Do not call into JS from WasmDebugInfo::GetFunctionScript

This disables notification of wasm script 'compilation' since
OnAfterCompile actually triggers a JS call (which is disallowed during
stack trace collection).

BUG=641065

Review-Url: https://codereview.chromium.org/2304943002
Cr-Commit-Position: refs/heads/master@{#39139}
parent 1d2ab6e0
......@@ -162,7 +162,11 @@ Script *WasmDebugInfo::GetFunctionScript(Handle<WasmDebugInfo> debug_info,
line_ends->set_map(isolate->heap()->fixed_cow_array_map());
script->set_line_ends(*line_ends);
isolate->debug()->OnAfterCompile(script);
// TODO(clemensh): Register with the debugger. Note that we cannot call into
// JS at this point since this function is called from within stack trace
// collection (which means we cannot call Debug::OnAfterCompile in its
// current form). See crbug.com/641065.
if (false) isolate->debug()->OnAfterCompile(script);
return *script;
}
......
......@@ -107,17 +107,10 @@ function setup() {
(function testRegisteredWasmScripts1() {
setup();
Debug.setListener(listener);
// Initially 0 scripts.
assertEquals(0, num_wasm_scripts);
// Call the "call_import" function -> 1 script.
module.exports.call_import();
assertEquals(1, num_wasm_scripts);
// Call "call_import" again -> still just 1 script.
module.exports.call_import();
assertEquals(1, num_wasm_scripts);
// Call "call_call_import" -> now 2 scripts.
module.exports.call_call_import();
assertEquals(2, num_wasm_scripts);
Debug.setListener(null);
assertEquals(3, break_count);
......@@ -127,11 +120,7 @@ function setup() {
(function testRegisteredWasmScripts2() {
setup();
Debug.setListener(listener);
// Initially 0 scripts.
assertEquals(0, num_wasm_scripts);
// Call the "call_call_import" function -> 2 scripts should be registered.
module.exports.call_call_import();
assertEquals(2, num_wasm_scripts);
Debug.setListener(null);
assertEquals(1, break_count);
......
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