Closed
Bug 1490286
Opened 6 years ago
Closed 6 years ago
In the WebAssembly.Global constructor, use the default value if the v argument is undefined
Categories
(Core :: JavaScript: WebAssembly, defect, P3)
Core
JavaScript: WebAssembly
Tracking
()
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: Ms2ger, Assigned: lth)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
4.20 KB,
patch
|
lth
:
review+
|
Details | Diff | Splinter Review |
Per spec: https://webassembly.github.io/spec/js-api/#dom-global-global step 3 Tested in: wasm/jsapi/global/constructor.any.js (which runs in jstests and wpt).
Comment 1•6 years ago
|
||
Note for when I update the docs to account for this — If value is not specified, use a default value as specified at https://webassembly.github.io/spec/js-api/#defaultvalue
Keywords: dev-doc-needed
Assignee | ||
Comment 2•6 years ago
|
||
WasmGlobalObject::construct() does not treat an undefined 2nd argument the way it treats a missing 2nd argument.
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Priority: -- → P3
Assignee | ||
Comment 3•6 years ago
|
||
Attachment #9009077 -
Flags: review?(jseward)
Reporter | ||
Comment 4•6 years ago
|
||
Comment on attachment 9009077 [details] [diff] [review] bug1490286-ignore-undefined-value-for-global.patch Review of attachment 9009077 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/wasm/WasmJS.cpp @@ +2463,2 @@ > if (args.length() >= 2) { > RootedValue valueVal(cx, args.get(1)); args.get(1) will give you undefined on out-of-bounds access, so the length check is no longer necessary.
Comment 5•6 years ago
|
||
Comment on attachment 9009077 [details] [diff] [review] bug1490286-ignore-undefined-value-for-global.patch Review of attachment 9009077 [details] [diff] [review]: ----------------------------------------------------------------- Looks OK to me. If you choose to remove the bounds check per comment 4, maybe add a 1-liner comment which is essentially the last line of comment 4.
Attachment #9009077 -
Flags: review?(jseward) → review+
Assignee | ||
Comment 6•6 years ago
|
||
Changes our own test cases to conform as well. Carrying jseward's r+.
Attachment #9009077 -
Attachment is obsolete: true
Attachment #9009605 -
Flags: review+
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ce36705acf73 Ignore 'undefined' value when constructing wasm global. r=jseward
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ce36705acf73
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment 9•6 years ago
|
||
I've documented this by adding a description of the default value to: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global#Constructor_Syntax I've also added a note about it to the Fx 64 rel notes: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/64#JavaScript
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•