| Index: src/wasm/wasm-js.cc
|
| diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
|
| index 6dc14952a01e943b8bd5a9fc012c8d648c59dbae..bcccf2e3ebcd4a10c454392f5b1530a9405a2ef1 100644
|
| --- a/src/wasm/wasm-js.cc
|
| +++ b/src/wasm/wasm-js.cc
|
| @@ -141,6 +141,11 @@ v8::internal::wasm::ZoneBuffer* TranslateAsmModule(
|
| return nullptr;
|
| }
|
|
|
| + if (!info->scope()->declarations()->at(0)->IsFunctionDeclaration()) {
|
| + thrower->Error("Asm.js validation failed: non-function declaration");
|
| + return nullptr;
|
| + }
|
| +
|
| info->set_literal(
|
| info->scope()->declarations()->at(0)->AsFunctionDeclaration()->fun());
|
|
|
|
|