Open Bug 1800914 Opened 1 year ago Updated 2 months ago

Don't suspend event pages until the browser has fully started up

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Whiteboard: [addons-jira])

Event pages are currently suspended after some period of inactivity. One of the triggers is event dispatch. We reset the timer here at the start of fire in EventManager: https://searchfox.org/mozilla-central/rev/219df29d0fb5d8928ae41bba4a605046de411cf0/toolkit/components/extensions/ExtensionCommon.jsm#2500-2507,2513,2522,2533,2541. The assumption here is that the event handler should complete within that time.

Firefox can be slow at startup, outside the control of extensions, and consequently that assumption may be incorrect. To cater for that, we should use a more dynamic approach to suspending pages, e.g. not suspending pages shortly after browser startup. At least for known cases where extension APIs are knowingly not responding soon enough (e.g. bug 1741865, specifically the runtime.onStartup event as mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1741865#c60).

Severity: -- → S2
Priority: -- → P2
Whiteboard: [addons-jira]
Depends on: 1874406
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.