WebAssembly: Module.exports, Module.imports, Module.customSections are wrong
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Apr 2017 07:52:03 +0000 (07:52 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Apr 2017 07:52:03 +0000 (07:52 +0000)
commit3ea4103ca3ef511e89e6a9743be3856f8f519538
tree1ee0cbc3eaaf21c61447142d6792835e6e9bcea8
parentf417d9975ee228d3d0e55e94ea399b8d4fdbcbc4
WebAssembly: Module.exports, Module.imports, Module.customSections are wrong
https://bugs.webkit.org/show_bug.cgi?id=171078

Reviewed by Saam Barati.

They're static properties of Module, not instance properties of a module.
https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymoduleexports

JSTests:

* wasm/js-api/Module.customSection.js:
(assert.throws.WebAssembly.Module.customSections):
(assert.eq):
(assert.throws.WebAssembly.Module.prototype.customSections): Deleted.
* wasm/js-api/Module.exports.js:
(assert.throws.WebAssembly.Module.exports):
(assert.truthy):
(assert.throws.WebAssembly.Module.prototype.exports): Deleted.
* wasm/js-api/Module.imports.js:
(assert.throws.WebAssembly.Module.imports):
(assert.truthy):
(assert.throws.WebAssembly.Module.prototype.imports): Deleted.

Source/JavaScriptCore:

* wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::webAssemblyModuleCustomSections):
(JSC::webAssemblyModuleImports):
(JSC::webAssemblyModuleExports):
* wasm/js/WebAssemblyModulePrototype.cpp:
(JSC::webAssemblyModuleProtoCustomSections): Deleted.
(JSC::webAssemblyModuleProtoImports): Deleted.
(JSC::webAssemblyModuleProtoExports): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/wasm/js-api/Module.customSection.js
JSTests/wasm/js-api/Module.exports.js
JSTests/wasm/js-api/Module.imports.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.cpp