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

Unified Diff: src/asmjs/asm-typer.cc

Issue 2558813004: [wasm][asm.js] Fail sooner if eval is present. (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-672045.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/asmjs/asm-typer.cc
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc
index dff43b7db61bf4c402a2dfd3fd774cfb11c8641c..b10f6de5ffe3f7515869582deabf6ec7031124d8 100644
--- a/src/asmjs/asm-typer.cc
+++ b/src/asmjs/asm-typer.cc
@@ -583,6 +583,10 @@ AsmType* AsmTyper::ValidateModuleBeforeFunctionsPhase(FunctionLiteral* fun) {
Variable* param = scope->parameter(ii);
DCHECK(param);
+ if (param->location() != VariableLocation::PARAMETER) {
titzer 2016/12/08 10:39:54 I don't think this is the check you want. There ar
bradn 2016/12/08 10:53:24 Done.
+ FAIL(fun, "Invalid asm.js module using eval.");
+ }
+
if (!ValidAsmIdentifier(param->name())) {
FAIL(fun, "Invalid asm.js identifier in module parameter.");
}
« no previous file with comments | « no previous file | test/mjsunit/asm/regress-672045.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698