[webkit-reviews] review granted: [Bug 171078] WebAssembly: Module.exports, Module.imports, Module.customSections are wrong : [Attachment 307896] patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 21 23:57:17 PDT 2017


Saam Barati <sbarati at apple.com> has granted JF Bastien <jfbastien at apple.com>'s
request for review:
Bug 171078: WebAssembly: Module.exports, Module.imports, Module.customSections
are wrong
https://bugs.webkit.org/show_bug.cgi?id=171078

Attachment 307896: patch

https://bugs.webkit.org/attachment.cgi?id=307896&action=review




--- Comment #2 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 307896
  --> https://bugs.webkit.org/attachment.cgi?id=307896
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


More information about the webkit-reviews mailing list