I am tired of objects that let typos return `undefined` instead of telling me that I have made a typo

RESOLVED FIXED in Firefox 40

Status

()

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Yoric, Assigned: Yoric)

Tracking

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

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
Created attachment 8594237 [details]
MozReview Request: bz://1155877/Yoric

/r/7237 - Bug 1155877 - ObjectUtils.strict;r=mossop

Pull down this commit:

hg pull -r 067cfee07a2490b6933a22417753b58b0bda97aa https://reviewboard-hg.mozilla.org/gecko/
Attachment #8594237 - Flags: review?(dtownsend)
I find myself implementing this over and over again for debugging, so I believe we can as well put it in our library.
Comment on attachment 8594237 [details]
MozReview Request: bz://1155877/Yoric

https://reviewboard.mozilla.org/r/7235/#review6001

::: toolkit/modules/ObjectUtils.jsm
(Diff revision 1)
> +  if (!AppConstants.DEBUG) {

Why would we only do this in debug builds? If only valid properties of an object are meant to be accessed in debug mode I don't know why it wouldn't be the case in non-debug. This creates a gotcha that can only confuse.
Attachment #8594237 - Flags: review?(dtownsend)
Fine by me. I just wanted to avoid the cost of a Proxy.
Comment on attachment 8594237 [details]
MozReview Request: bz://1155877/Yoric

/r/7237 - Bug 1155877 - ObjectUtils.strict;r=mossop

Pull down this commit:

hg pull -r 97bab5e2bee6415eeed6505e5f61927e0bca5171 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8594237 - Flags: review?(dtownsend)
Comment on attachment 8594237 [details]
MozReview Request: bz://1155877/Yoric

https://reviewboard.mozilla.org/r/7235/#review6005

Ship It!
Attachment #8594237 - Flags: review?(dtownsend) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/cee13569d8d4
Assignee: nobody → dteller
Flags: in-testsuite+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/cee13569d8d4
Status: NEW → RESOLVED
Last Resolved: 4 years ago
status-firefox40: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Comment on attachment 8594237 [details]
MozReview Request: bz://1155877/Yoric
Attachment #8594237 - Attachment is obsolete: true
Attachment #8620088 - Flags: review+
Created attachment 8620088 [details]
MozReview Request: Bug 1155877 - ObjectUtils.strict;r=mossop
You need to log in before you can comment on or make changes to this bug.