Closed Bug 1155877 Opened 6 years ago Closed 6 years ago

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

Categories

(Toolkit :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: Yoric, Assigned: Yoric)

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Attached file MozReview Request: bz://1155877/Yoric (obsolete) —
/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+
https://hg.mozilla.org/mozilla-central/rev/cee13569d8d4
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Attachment #8594237 - Attachment is obsolete: true
Attachment #8620088 - Flags: review+
You need to log in before you can comment on or make changes to this bug.