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) { |