Support callable function imports other than JSFunction
Categories
(Core :: JavaScript: WebAssembly, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(2 files)
According to the spec, Wasm func module imports can be any callable JS object. In SpiderMonkey we currently only support JSFunction
instances and throw a LinkError
for other callables such as callable proxies.
I noticed this while prototyping a different design for bound functions (bug 1812316). This matches the spec better but failed a number of Wasm tests that use bound functions.
I also confirmed Chrome and Safari support importing non-function callables (tested with a callable proxy).
Assignee | ||
Comment 1•3 years ago
|
||
With this patch we use IsCallable
instead of checking for the JSFunction
class.
This matches the spec but requires changing a number of places to use JSObject*
instead
of JSFunction*
.
We still reject cross-compartment wrappers because they have some additional
complexity.
Assignee | ||
Comment 2•3 years ago
|
||
Depends on D168946
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e52b71a29297
https://hg.mozilla.org/mozilla-central/rev/a0d620ed5943
Updated•2 years ago
|
Updated•2 years ago
|
Description
•