Closed Bug 882547 Opened 13 years ago Closed 13 years ago

Treat undefined values in dictionaries as missing

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

Per discussion on the list.
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)
Attachment #761872 - Flags: review?(bugs) → review+
Something odd with the tryserver
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.
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: