WebIDL callbacks should pass undefined, not null as the this value if none is provided

RESOLVED FIXED in mozilla29

Status

()

Core
DOM
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

unspecified
mozilla29
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

Because that's how ES functions normally work (modulo the non-strict mode coercion [[Call]] does).
Spec bug at https://www.w3.org/Bugs/Public/show_bug.cgi?id=24248
Created attachment 8357608 [details] [diff] [review]
Pass undefined, not null, as the this value to callbacks if no other value is provided.
Attachment #8357608 - Flags: review?(peterv)
Blocks: 945766
Equivalent bugs on Chrome and Safari, except they weren't following the spec to start with: http://code.google.com/p/chromium/issues/detail?id=332663 and https://bugs.webkit.org/show_bug.cgi?id=126680
Whiteboard: [need review]
Created attachment 8357618 [details] [diff] [review]
Pass undefined, not null, as the this value to callbacks if no other value is provided.

Compartment assertion and style fixes.
Attachment #8357618 - Flags: review?(jorendorff)
Assignee: bzbarsky → nsm.nikhil
Nikhil, you managed to conflate the patch in this bug and the one in bug 957926?
Assignee: nsm.nikhil → bzbarsky
Comment on attachment 8357618 [details] [diff] [review]
Pass undefined, not null, as the this value to callbacks if no other value is provided.

wrong bug and patch.
Attachment #8357618 - Attachment is obsolete: true
Attachment #8357618 - Flags: review?(jorendorff)
Attachment #8357608 - Flags: review?(peterv) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ec95f288a57
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla29
https://hg.mozilla.org/mozilla-central/rev/7ec95f288a57
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.