Closed Bug 1748535 Opened 3 years ago Closed 2 years ago

gracefully handling corrupted / lost startupCache scenario

Categories

(WebExtensions :: General, enhancement, P3)

enhancement
Points:
5

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1748524

People

(Reporter: mixedpuppy, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Instead of always starting up the background page once the browser startup is completed, start it:

  • if no startupCache was available (or no persisted listeners/objects were available), automatically start the background string on addon startup
  • If startupCache / persisted listeners / persisted extension objects are available, don’t start the background script until an event does trigger it
  • Are there any APIs that would cause the background page to be loaded?

As the runtime.onInstalled method is the documented way to register (persistent) rules/events, we should make sure that we dispatch this event if the rules/events are gone. Dispatched from https://searchfox.org/mozilla-central/rev/69a482382823f42f482e840f65725218d7654cc4/toolkit/components/extensions/parent/ext-runtime.js#56-70

See Also: → 1755589

runtime.onInstalled method is the documented way to register (persistent) rules/events

To be clear, events are documented to be persisted when the background page is loaded, not during onInstalled.

See Also: → 1762394

What is described in comment 0 has been included in the changes landed as part of Bug 1748524 (in particular nearby here) and so I'm marking this as a duplicate of that one.

If we determine something more to be done besides what comment 0 was describing, then we will file new bugs with details about the new specific cases that we want to consider some special handling for.

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