Index: src/asmjs/asm-typer.cc |
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc |
index a05422ffd3492814925f7574c2ee6e9738ae0a32..dff43b7db61bf4c402a2dfd3fd774cfb11c8641c 100644 |
--- a/src/asmjs/asm-typer.cc |
+++ b/src/asmjs/asm-typer.cc |
@@ -935,6 +935,10 @@ AsmType* AsmTyper::ValidateExport(ReturnStatement* exports) { |
"Only normal object properties may be used in the export object " |
"literal."); |
} |
+ if (!prop->key()->AsLiteral()->IsPropertyName()) { |
+ FAIL(prop->key(), |
+ "Exported functions must have valid identifier names."); |
+ } |
auto* export_obj = prop->value()->AsVariableProxy(); |
if (export_obj == nullptr) { |