Closed Bug 1063859 Opened 10 years ago Closed 10 years ago

JavaScript Warning: "reference to undefined property this.notifications[origin]" {file: "resource://gre/modules/NotificationDB.jsm" line: 296}]

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED FIXED
2.1 S5 (26sep)
tracking-b2g backlog

People

(Reporter: gwagner, Assigned: gerard-majax)

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 1 obsolete file)

Seen on flame with debug gecko during startup with fresh profile on trunk.

E/GeckoConsole(  224): [JavaScript Warning: "reference to undefined property this.notifications[origin]" {file: "resource://gre/modules/NotificationDB.jsm" line: 296}]
Whiteboard: [systemsfe]
blocking-b2g: --- → backlog
Can we fix this?
Flags: needinfo?(mhenretty)
Assignee: nobody → lissyx+mozillians
Flags: needinfo?(mhenretty)
That makes sense: this.notifications is empty, and we are trying to iterate over this.notifications[origin].
When we are performing the getAll/getAllCrossOrigin requests and there
is no notifications, then this.notifications[origin] (with a valid
origin) is just undefined. We should make sure we do not iterate over in
this case.
When we are performing the getAll/getAllCrossOrigin requests and there
is no notifications, then this.notifications[origin] (with a valid
origin) is just undefined. We should make sure we do not iterate over in
this case.
Attachment #8493786 - Attachment is obsolete: true
Attachment #8493786 - Flags: review?(mhenretty)
Comment on attachment 8493789 [details] [diff] [review]
Do not iterate on undefined valued when querying notifications r=mhenretty

This does fix locally.

Pending try:
https://tbpl.mozilla.org/?tree=Try&rev=4824e4251197
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=4824e4251197
Attachment #8493789 - Flags: review?(mhenretty)
Comment on attachment 8493789 [details] [diff] [review]
Do not iterate on undefined valued when querying notifications r=mhenretty

Review of attachment 8493789 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8493789 - Flags: review?(mhenretty) → review+
Attachment #8493786 - Flags: review?(mhenretty)
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/cab3537db5c5
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S5 (26sep)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: