DescriptionMake clicking the restart bubble for crashed apps work.
Previously AppLoadService listened for
NOTIFICATION_EXTENSION_HOST_DID_STOP_LOADING before dispatching the
onRestarted() event after a reload, but in the case of packaged apps, which use
non-persistent background pages, that notification will never get fired. This
is because reloading an app doesn't cause its background page to get loaded -
only a relevant event causes the page to be woken up.
This patch fixes the issue by listening for NOTIFICATION_EXTENSION_LOADED
instead, which is always fired after a reload. It also determines whether an
extension is listening to an event by checking which events it has registered
for, not which ones it currently has a listener for,
NOTIFICATION_EXTENSION_LOADED is the notification that listeners get created
on, and so to avoid raciness we check registered events (ie: the persisted
list of events that an extension is interested in).
BUG=327964
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=241162
Patch Set 1 #
Total comments: 2
Patch Set 2 : respond to comments #
Total comments: 4
Patch Set 3 : respond to comments #
Total comments: 2
Patch Set 4 : fix .count() #Messages
Total messages: 9 (0 generated)
|