WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165982
WebAssembly: Implement the WebAssembly.instantiate API
https://bugs.webkit.org/show_bug.cgi?id=165982
Summary
WebAssembly: Implement the WebAssembly.instantiate API
Saam Barati
Reported
2016-12-16 18:31:19 PST
...
Attachments
WIP
(27.02 KB, patch)
2017-03-03 18:47 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
WIP
(22.15 KB, patch)
2017-03-05 12:01 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
WIP
(28.53 KB, patch)
2017-03-05 12:23 PST
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(30.92 KB, patch)
2017-03-05 14:01 PST
,
Saam Barati
keith_miller
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-12-20 14:19:01 PST
<
rdar://problem/29760110
>
Saam Barati
Comment 2
2017-03-03 18:47:51 PST
Created
attachment 303376
[details]
WIP
Saam Barati
Comment 3
2017-03-05 12:01:35 PST
Created
attachment 303461
[details]
WIP Need to write tests still. I think the API is done.
Saam Barati
Comment 4
2017-03-05 12:23:40 PST
Created
attachment 303462
[details]
WIP Now with tests. I need to write a changelog still.
Saam Barati
Comment 5
2017-03-05 14:01:56 PST
Created
attachment 303464
[details]
patch
WebKit Commit Bot
Comment 6
2017-03-05 14:04:12 PST
Attachment 303464
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp:73: Missing space inside { }. [whitespace/braces] [5] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Keith Miller
Comment 7
2017-03-06 13:59:54 PST
Comment on
attachment 303464
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303464&action=review
r=me with some comments.
> Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp:117 > + throwException(exec, throwScope, createTypeError(exec, ASCIILiteral("import must be an object"), defaultSourceAppender, runtimeTypeForValue(importModuleValue))); > + return nullptr;
you could make a lambda like auto throw = [&] (Error* error) { throwException(exec, throwScope, error); return nullptr; }; then do: if (!importModuleValue.isObject()) return throw(createTypeError(exec, ASCIILiteral("import must be an object"), defaultSourceAppender, runtimeTypeForValue(importModuleValue)));
Keith Miller
Comment 8
2017-03-06 14:04:33 PST
Comment on
attachment 303464
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303464&action=review
> Source/JavaScriptCore/wasm/JSWebAssembly.cpp:102 > + module = WebAssemblyModuleConstructor::createModule(exec, firstArgument, exec->lexicalGlobalObject()->WebAssemblyModuleStructure());
I think we should pass the mode here if we are given a memory import.
Saam Barati
Comment 9
2017-03-06 14:24:20 PST
(In reply to
comment #8
)
> Comment on
attachment 303464
[details]
> patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=303464&action=review
> > > Source/JavaScriptCore/wasm/JSWebAssembly.cpp:102 > > + module = WebAssemblyModuleConstructor::createModule(exec, firstArgument, exec->lexicalGlobalObject()->WebAssemblyModuleStructure()); > > I think we should pass the mode here if we are given a memory import.
We should do this in a follow up since it's non trivial. I filed:
https://bugs.webkit.org/show_bug.cgi?id=169218
Saam Barati
Comment 10
2017-03-06 14:24:59 PST
Comment on
attachment 303464
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=303464&action=review
>> Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp:117 >> + return nullptr; > > you could make a lambda like > > auto throw = [&] (Error* error) { > throwException(exec, throwScope, error); > return nullptr; > }; > > then do: > > if (!importModuleValue.isObject()) > return throw(createTypeError(exec, ASCIILiteral("import must be an object"), defaultSourceAppender, runtimeTypeForValue(importModuleValue)));
Sounds good. Will do.
Saam Barati
Comment 11
2017-03-06 23:39:42 PST
landed in:
https://trac.webkit.org/changeset/213506
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug