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

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

Issue 2044833002: [wasm] Dont compute global offsets if the module had errors (e.g. invalid memory type for global). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | test/unittests/wasm/module-decoder-unittest.cc » ('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 1fb7da3473c8075ef6bf6e09d1c3a6fd8c17d641..48f59cefa82bdf1d293da3eb529d4244e7dc2485 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -384,7 +384,7 @@ class ModuleDecoder : public Decoder {
}
done:
- CalculateGlobalsOffsets(module);
+ if (ok()) CalculateGlobalsOffsets(module);
const WasmModule* finished_module = module;
ModuleResult result = toResult(finished_module);
if (FLAG_dump_wasm_module) {
« no previous file with comments | « no previous file | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698