Closed
Bug 910300
Opened 11 years ago
Closed 11 years ago
JS Strict warning "reference to undefined property options.bytes"
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla27
People
(Reporter: Irving, Assigned: heycam)
References
Details
(Whiteboard: [mentor=Yoric][lang=js])
Attachments
(1 file)
1.02 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
Seeing "reference to undefined property options.bytes" warnings in my log. Oddly, the warnings don't come with any file/line number information, and are not terminated with a linefeed. For example:
*** LOG DeferredSave/extensions.json: Starting write
reference to undefined property options.bytes*** LOG DeferredSave/extensions.json: Write succeeded
*** LOG addons.xpi-utils: XPI Database saved, setting schema version preference to 15
DXR shows the only reads of options.bytes to be in osfile_shared_front.jsm: http://dxr.mozilla.org/mozilla-central/search?tree=mozilla-central&q=options.bytes&redirect=true
Updated•11 years ago
|
Whiteboard: [mentor=Yoric][lang=js]
Comment 1•11 years ago
|
||
I'm seeing lots of these lately. They look like this:
JavaScript Warning: "reference to undefined property options.bytes" {file: "resource://gre/modules/osfile/osfile_shared_front.jsm" line: 116}
Assignee | ||
Comment 2•11 years ago
|
||
Sorry for stealing a mentorable bug, but this is annoying me too much!
Comment 3•11 years ago
|
||
Comment on attachment 805778 [details] [diff] [review]
patch
Review of attachment 805778 [details] [diff] [review]:
-----------------------------------------------------------------
Is that sufficient to make the warning disappear?
/me will never understand how JS warnings work.
Assignee | ||
Comment 4•11 years ago
|
||
I'm not sure why that makes it OK, despite still accessing the non-existent property, but there is at least one other example of JS code that does this to silence a warning, and testing locally confirmed it worked.
Comment 5•11 years ago
|
||
Comment on attachment 805778 [details] [diff] [review]
patch
Review of attachment 805778 [details] [diff] [review]:
-----------------------------------------------------------------
Well, in that case, r=me.
Attachment #805778 -
Flags: review?(dteller) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•