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

Unified Diff: src/wasm/wasm-module.cc

Issue 2725333002: [wasm] Also unwrap exported debugged functions (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 209602ebdca0ef1238ccb3da93044181e3abd745..dab59aa8f91c0149a01f88e8ceaf7f024c31e1a6 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -869,20 +869,17 @@ static Handle<Code> UnwrapImportWrapper(Handle<Object> import_wrapper) {
for (RelocIterator it(*export_wrapper_code, mask);; it.next()) {
DCHECK(!it.done());
Code* target = Code::GetCodeFromTargetAddress(it.rinfo()->target_address());
- if (target->kind() == Code::WASM_INTERPRETER_ENTRY) {
- // Don't call the interpreter entry directly, otherwise we cannot
- // disable the breakpoint later by patching the exported code.
- return Handle<Code>::null();
- }
if (target->kind() != Code::WASM_FUNCTION &&
- target->kind() != Code::WASM_TO_JS_FUNCTION)
+ target->kind() != Code::WASM_TO_JS_FUNCTION &&
+ target->kind() != Code::WASM_INTERPRETER_ENTRY)
continue;
// There should only be this one call to wasm code.
#ifdef DEBUG
for (it.next(); !it.done(); it.next()) {
Code* code = Code::GetCodeFromTargetAddress(it.rinfo()->target_address());
DCHECK(code->kind() != Code::WASM_FUNCTION &&
- code->kind() != Code::WASM_TO_JS_FUNCTION);
+ code->kind() != Code::WASM_TO_JS_FUNCTION &&
+ code->kind() != Code::WASM_INTERPRETER_ENTRY);
}
#endif
return handle(target);
@@ -901,10 +898,7 @@ Handle<Code> CompileImportWrapper(Isolate* isolate, int index, FunctionSig* sig,
if (!sig->Equals(other_func->sig)) return Handle<Code>::null();
// Signature matched. Unwrap the JS->WASM wrapper and return the raw
// WASM function code.
- Handle<Code> code = UnwrapImportWrapper(target);
- // If we got no code (imported function is being debugged), fall through
- // to CompileWasmToJSWrapper.
- if (!code.is_null()) return code;
+ return UnwrapImportWrapper(target);
}
// No wasm function or being debugged. Compile a new wrapper for the new
// signature.
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698