Closed Bug 768696 Opened 12 years ago Closed 12 years ago

b2g/chrome/content/shell.js does not receive mozContentEvents

Categories

(Firefox OS Graveyard :: General, defect)

x86
All
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 768238

People

(Reporter: djf, Assigned: djf)

References

Details

Attachments

(1 file)

Attached patch bugfixSplinter Review
This is a relatively recent regression in shell.js: mozContentEvents sent from the system app are not being received by the handlers in shell.js. (at least not on otoro).  This means that things like notifications and app installs probably aren't working.

The problem is that those handlers are registered after the ContentStart event. And the ContentStart event is triggered by the first the mozbrowserloadstart event.  But it turns out that mozbrowserloadstart occurs a few times when B2G starts up.  And the first couple of times, the content location is about:blank.  
So the ContentStart is being triggered before content has actually loaded, and the mozContentEvent handlers are being registered on the about:blank content.  When the homescreen actually loads, they're being discarded.

See the shell.start() and shell.handleEvent() methods in shell.js for details.

The attached patch is a two-line fix that ignores mozbrowserloadstart if the content location is about:blank.  I've tested it on otoro and it seems to fix the problem.

I'm asking Vivien to review, and cc'ing Chris since he was recently pretty deep into shell.js. Feel free to take the review yourself, Chris, if you want it.
Attachment #636919 - Flags: review?(21)
Blocks: 768701
Looks like this was already fixed in 768238.

Closing.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: