RESOLVED FIXED 171078
WebAssembly: Module.exports, Module.imports, Module.customSections are wrong
https://bugs.webkit.org/show_bug.cgi?id=171078
Summary WebAssembly: Module.exports, Module.imports, Module.customSections are wrong
JF Bastien
Reported 2017-04-20 15:00:25 PDT
They're static properties of Module, not instance properties of a module. https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymoduleexports
Attachments
patch (23.13 KB, patch)
2017-04-21 23:51 PDT, JF Bastien
saam: review+
saam: commit-queue-
patch (23.08 KB, patch)
2017-04-22 00:11 PDT, JF Bastien
no flags
JF Bastien
Comment 1 2017-04-21 23:51:51 PDT
Saam Barati
Comment 2 2017-04-21 23:57:17 PDT
Comment on attachment 307896 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=307896&action=review > Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp:64 > + customSections webAssemblyModuleCustomSections DontEnum|Function 2 > + imports webAssemblyModuleImports DontEnum|Function 1 > + exports webAssemblyModuleExports DontEnum|Function 1 Please add tests asserting these are functions w/ the correct length. > Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp:74 > + JSWebAssemblyModule* module = jsDynamicCast<JSWebAssemblyModule*>(vm, exec->argument(0)); nit: 1 too many spaces before exec. > Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp:91 > + Structure* arrayBufferStructure = InternalFunction::createSubclassStructure(exec, JSValue(), globalObject->arrayBufferStructure(ArrayBufferSharingMode::Default)); Why createSubclassStructure here? Pretty sure this ain't needed. I think you should just use arrayBufferStructure
JF Bastien
Comment 3 2017-04-22 00:11:16 PDT
WebKit Commit Bot
Comment 4 2017-04-22 00:52:06 PDT
Comment on attachment 307897 [details] patch Clearing flags on attachment: 307897 Committed r215664: <http://trac.webkit.org/changeset/215664>
WebKit Commit Bot
Comment 5 2017-04-22 00:52:07 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.