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

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

Issue 2612643002: [wasm] simplify dependencies between graph builder and function decoder (Closed)
Patch Set: Created 3 years, 12 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/wasm/function-body-decoder.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 070da72db73971a4f84891b019d5299e5779df64..550a2bd61779189a04490082686588e41d13afec 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -763,10 +763,12 @@ class ModuleDecoder : public Decoder {
os << "Verifying WASM function " << WasmFunctionName(function, menv)
<< std::endl;
}
- FunctionBody body = {menv, function->sig, start_,
+ FunctionBody body = {function->sig, start_,
start_ + function->code_start_offset,
start_ + function->code_end_offset};
- DecodeResult result = VerifyWasmCode(module_zone->allocator(), body);
+ DecodeResult result =
+ VerifyWasmCode(module_zone->allocator(),
+ menv == nullptr ? nullptr : menv->module, body);
if (result.failed()) {
// Wrap the error message from the function decoder.
std::ostringstream str;
« no previous file with comments | « src/wasm/function-body-decoder.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698