| Index: src/wasm/wasm-module.cc
|
| diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
|
| index 5035e91fbc91a49f8c6e71c7b37a212dfe7fcf72..1fa545bb7a2d65ea9fde9d32507015349d3d113b 100644
|
| --- a/src/wasm/wasm-module.cc
|
| +++ b/src/wasm/wasm-module.cc
|
| @@ -1409,21 +1409,16 @@ class WasmInstanceBuilder {
|
|
|
| Handle<Object> module = result.ToHandleChecked();
|
|
|
| - // TODO(bradnelson): Making this conditional on non-empty names violates the
|
| - // Wasm spec, but seems to be a hack intended for the asm-to-wasm pipeline.
|
| - // We need to get rid of it.
|
| - if (import_name->length() != 0) {
|
| - // Look up the value in the module.
|
| - if (!module->IsJSReceiver()) {
|
| - return ReportTypeError("module is not an object or function", index,
|
| - module_name);
|
| - }
|
| + // Look up the value in the module.
|
| + if (!module->IsJSReceiver()) {
|
| + return ReportTypeError("module is not an object or function", index,
|
| + module_name);
|
| + }
|
|
|
| - result = Object::GetPropertyOrElement(module, import_name);
|
| - if (result.is_null()) {
|
| - ReportLinkError("import not found", index, module_name, import_name);
|
| - return MaybeHandle<JSFunction>();
|
| - }
|
| + result = Object::GetPropertyOrElement(module, import_name);
|
| + if (result.is_null()) {
|
| + ReportLinkError("import not found", index, module_name, import_name);
|
| + return MaybeHandle<JSFunction>();
|
| }
|
|
|
| return result;
|
|
|