Closed
Bug 882547
Opened 13 years ago
Closed 13 years ago
Treat undefined values in dictionaries as missing
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
|
3.71 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Per discussion on the list.
| Assignee | ||
Comment 1•13 years ago
|
||
Example of the new codegen with a default value:
if (isNull) {
temp.setUndefined();
} else if (!JS_GetPropertyById(cx, &val.toObject(), b_id, temp.address())) {
return false;
}
if (!temp.isUndefined()) {
if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, &mB)) {
return false;
}
} else {
mB = 8;
}
and without a default value:
if (isNull) {
temp.setUndefined();
} else if (!JS_GetPropertyById(cx, &val.toObject(), a_id, temp.address())) {
return false;
}
if (!temp.isUndefined()) {
mA.Construct();
if (!ValueToPrimitive<int32_t, eDefault>(cx, temp, &(mA.Value()))) {
return false;
}
}
Attachment #761872 -
Flags: review?(bugs)
| Assignee | ||
Comment 2•13 years ago
|
||
For what it's worth, try push: https://tbpl.mozilla.org/?tree=Try&rev=43e7282ba506
Updated•13 years ago
|
Attachment #761872 -
Flags: review?(bugs) → review+
Comment 3•13 years ago
|
||
Something odd with the tryserver
| Assignee | ||
Comment 4•13 years ago
|
||
Yeah, more relevant try push at https://tbpl.mozilla.org/?tree=Try&rev=c765bc25d5b8
There is one failure in test_blobconstructor.html which does this:
34 blob = Blob([], {type: undefined});
35 ok(blob, "Blob should exist");
36 is(blob.type, "undefined", "Blob type should be stringified");
I believe I should just adjust this test.
| Assignee | ||
Comment 5•13 years ago
|
||
Whiteboard: [need review]
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•