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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla27

People

(Reporter: Irving, Assigned: heycam)

References

Details

(Whiteboard: [mentor=Yoric][lang=js])

Attachments

(1 file)

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
Depends on: 903672
Whiteboard: [mentor=Yoric][lang=js]
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}
Attached patch patchSplinter Review
Sorry for stealing a mentorable bug, but this is annoying me too much!
Assignee: nobody → cam
Status: NEW → ASSIGNED
Attachment #805778 - Flags: review?(dteller)
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.
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 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+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: