Index: src/asmjs/asm-typer.cc |
diff --git a/src/asmjs/asm-typer.cc b/src/asmjs/asm-typer.cc |
index 0ac40ec6f7ad73d0c30bc6ded3ba706e43a071dd..405047a5a29eb0aed8ccf32a1644b9bbb2fcf651 100644 |
--- a/src/asmjs/asm-typer.cc |
+++ b/src/asmjs/asm-typer.cc |
@@ -945,6 +945,10 @@ AsmType* AsmTyper::ExportType(VariableProxy* fun_export) { |
FAIL(fun_export, "Module export is not an asm.js function."); |
} |
+ if (!fun_export->var()->is_function()) { |
+ FAIL(fun_export, "Module exports must be function declarations."); |
+ } |
+ |
return type; |
} |