forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1728327 - Introduce a new nsIServiceWorkerManager.wakeForExtensio…
…nAPIEvent method. r=asuth This patch includes a set of changes to the ServiceWorker internals to introduce a new nsIServiceWorkerManager.wakeForExtensionAPIEvent method, to be used by the WebExtensions internals to request an active background service worker to be spawned (if it is not yet) in response to a WebExtension API event. The new method gets as parameters: - the scope URL for the extension background service worker to spawn - WebExtensions API namespace and API event name which we are going to spawn an active worker for and return a promise which would be: - rejected if the worker could not be spawned - resolved to a boolean if the worker was spawned successfully (or already running) The value of the boolean value resolved is meant to represent if the worker did actually have any listener subscribed for the given WebExtensions API event listener (which the WebExtensions internals may then use to decide if it is worth to send that event to be handled by the worker script or not). In this patch the ExtensionBrowser::HasWakeupEventListener used to determine if an WebExtensions API event was subscribed syncronously when the worker was being loaded is not implemented yet and it is always returning false (a proposed implementation for that method is going to be added in a separate patch part of this same bugzilla issue). A unit test for the new proposed nsIServiceWorkerManager method is also part of a separate patch (attached to this bugzilla issue as the child revision for this one). Differential Revision: https://phabricator.services.mozilla.com/D130756
- Loading branch information
Showing
10 changed files
with
237 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters