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

Unified Diff: src/asmjs/asm-wasm-builder.cc

Issue 2546553002: [wasm] [asm.js] Ignore unused function tables in AsmWasmBuilder. (Closed)
Patch Set: Created 4 years 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/mjsunit/asm/regress-669899.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-wasm-builder.cc
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc
index bb9f14dea33b7e12950287d17482a1485bbf71c2..79845fcbe7db7f2242b37209da7d13b9b5e33d4d 100644
--- a/src/asmjs/asm-wasm-builder.cc
+++ b/src/asmjs/asm-wasm-builder.cc
@@ -782,7 +782,10 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> {
void PopulateFunctionTable(VariableProxy* table, ArrayLiteral* funcs) {
FunctionTableIndices* indices = LookupFunctionTable(table->var());
- DCHECK_NOT_NULL(indices);
+ // Ignore unused function tables.
+ if (indices == nullptr) {
+ return;
+ }
for (int i = 0; i < funcs->values()->length(); ++i) {
VariableProxy* func = funcs->values()->at(i)->AsVariableProxy();
DCHECK_NOT_NULL(func);
« no previous file with comments | « no previous file | test/mjsunit/asm/regress-669899.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698