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

Unified Diff: src/wasm/wasm-module.cc

Issue 2649163004: [wasm] JSAPI conformance: instance.exports has null prototype. (Closed)
Patch Set: Created 3 years, 11 months 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 | « src/factory.cc ('k') | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 42e252db53a6cefdce4eb83270f6e2c9c7438321..6eff8f2820848bcac4b38b3ad9727cdb29bde0a8 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -1912,10 +1912,7 @@ class WasmInstanceBuilder {
Handle<JSObject> exports_object = instance;
if (module_->origin == kWasmOrigin) {
// Create the "exports" object.
- Handle<JSFunction> object_function = Handle<JSFunction>(
- isolate_->native_context()->object_function(), isolate_);
- exports_object =
- isolate_->factory()->NewJSObject(object_function, TENURED);
+ exports_object = isolate_->factory()->NewJSObjectWithNullProto();
Handle<String> exports_name =
isolate_->factory()->InternalizeUtf8String("exports");
JSObject::AddProperty(instance, exports_name, exports_object, NONE);
« no previous file with comments | « src/factory.cc ('k') | test/mjsunit/wasm/js-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698