Index: src/wasm/module-decoder.cc |
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc |
index b0d2314a3ce8b281f132b36ce250b9bd4b5ed41c..0a36640308e9e4d488c7fee11e546339ccbb6fb3 100644 |
--- a/src/wasm/module-decoder.cc |
+++ b/src/wasm/module-decoder.cc |
@@ -491,8 +491,8 @@ class ModuleDecoder : public Decoder { |
break; |
} |
} |
- // Check for duplicate exports. |
- if (ok() && module->export_table.size() > 1) { |
+ // Check for duplicate exports (except for asm.js). |
+ if (ok() && origin_ != kAsmJsOrigin && module->export_table.size() > 1) { |
std::vector<WasmExport> sorted_exports(module->export_table); |
const byte* base = start_; |
auto cmp_less = [base](const WasmExport& a, const WasmExport& b) { |