gecko-dev/dom/serviceworkers
Anny Gakhokidze 28243d5736 Bug 1630323 - Do not override user preferences when clicking on a service worker notification to open a new document, r=Gijs,nika,geckoview-reviewers,snorp
In Bug 1622749 a user preference for where to open new documents (from a
service worker notification) was temporarily overriden in order to quickly fix
a crash that was happening in mozilla::dom::ClientOpenWindow. The crash was
ocurring when the pref "browser.link.open_newwindow" was set to 2, meaning new
documents are opened in a new window, instead of a new tab. The reason the
browser crashed is because the path for opening a new document is different
depending on the current user setting, and in NEWWINDOW case we did not get a
browsing context returned when calling mozilla::dom::OpenWindow which resulted
in a failed assertion.

The solution is to pass in a callback to mozilla::dom::OpenWindow as part of
nsOpenWindowInfo object, and invoke that callback with a corresponding
BrowsingContext in nsFrameLoader when that browsing context is ready.

After we call mozilla::dom::OpenWindow, we wait on a promise, that will be
resolved when the callback is invoked, before executing the rest of the code
that depends on the browsing context for a newly opened document being
available.

Differential Revision: https://phabricator.services.mozilla.com/D72745
2020-05-27 18:15:36 +00:00
..
test Bug 1630323 - Do not override user preferences when clicking on a service worker notification to open a new document, r=Gijs,nika,geckoview-reviewers,snorp 2020-05-27 18:15:36 +00:00
FetchEventOpChild.cpp Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:10:53 +00:00
FetchEventOpChild.h Bug 1615155 - Don't generate default Recv__delete__ if there are args. r=nika 2020-02-18 20:46:21 +00:00
FetchEventOpParent.cpp
FetchEventOpParent.h
FetchEventOpProxyChild.cpp Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:10:53 +00:00
FetchEventOpProxyChild.h Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:10:53 +00:00
FetchEventOpProxyParent.cpp Backed out changeset e1be97ce43d1 (bug 1622451) for failures on browser_download_canceled.js. CLOSED TREE 2020-05-01 03:58:25 +03:00
FetchEventOpProxyParent.h Bug 1615155 - Don't generate default Recv__delete__ if there are args. r=nika 2020-02-18 20:46:21 +00:00
IPCServiceWorkerDescriptor.ipdlh Bug 1407276 - Avoid creating InterceptedHttpChannel if the service worker has no fetch event handler r=dom-workers-and-storage-reviewers,asuth 2020-03-12 20:53:28 +00:00
IPCServiceWorkerRegistrationDescriptor.ipdlh
moz.build Bug 1363541 - Modernize the PermissionManager - part 4 - mozilla namespace, r=timhuang 2020-04-11 13:42:12 +00:00
PFetchEventOp.ipdl
PFetchEventOpProxy.ipdl
PServiceWorker.ipdl
PServiceWorkerContainer.ipdl
PServiceWorkerManager.ipdl
PServiceWorkerRegistration.ipdl Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
PServiceWorkerUpdater.ipdl
RemoteServiceWorkerContainerImpl.cpp Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark 2020-02-14 15:42:30 +00:00
RemoteServiceWorkerContainerImpl.h
RemoteServiceWorkerImpl.cpp
RemoteServiceWorkerImpl.h
RemoteServiceWorkerRegistrationImpl.cpp Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark 2020-02-14 15:42:30 +00:00
RemoteServiceWorkerRegistrationImpl.h Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorker.cpp Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark 2020-02-14 15:42:30 +00:00
ServiceWorker.h
ServiceWorkerActors.cpp
ServiceWorkerActors.h
ServiceWorkerChild.cpp
ServiceWorkerChild.h
ServiceWorkerCloneData.cpp
ServiceWorkerCloneData.h
ServiceWorkerContainer.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerContainer.h Bug 1613900 - P3 - ServiceWorker should treat all failures after deserializing as deserialization failures; r=dom-workers-and-storage-reviewers,perry 2020-02-14 21:23:28 +00:00
ServiceWorkerContainerChild.cpp
ServiceWorkerContainerChild.h
ServiceWorkerContainerImpl.cpp
ServiceWorkerContainerImpl.h
ServiceWorkerContainerParent.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/serviceworkers. r=dom-workers-and-storage-reviewers,janv 2020-02-12 10:52:29 +00:00
ServiceWorkerContainerParent.h
ServiceWorkerContainerProxy.cpp Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika 2020-04-07 15:16:33 +00:00
ServiceWorkerContainerProxy.h
ServiceWorkerDescriptor.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerDescriptor.h Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerEvents.cpp Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8 2020-05-14 04:44:33 +00:00
ServiceWorkerEvents.h Bug 1264175 - remove FetchEvent.isReload r=dom-workers-and-storage-reviewers,valentin,sg,bzbarsky 2020-01-25 00:05:12 +00:00
ServiceWorkerImpl.cpp
ServiceWorkerImpl.h
ServiceWorkerInfo.cpp Bug 1595964 Part 1 - Add nsIServiceWorkerRegistrationInfo.evaluatingWorker, r=asuth. 2019-12-07 18:18:07 +00:00
ServiceWorkerInfo.h Bug 1407276 - Avoid creating InterceptedHttpChannel if the service worker has no fetch event handler r=dom-workers-and-storage-reviewers,asuth 2020-03-12 20:53:28 +00:00
ServiceWorkerInterceptController.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerInterceptController.h
ServiceWorkerIPCUtils.h
ServiceWorkerJob.cpp Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika 2020-04-07 15:16:23 +00:00
ServiceWorkerJob.h Bug 1606157 - ServiceWorkerJob notify callbacks its being discarded r=asuth 2020-01-11 04:21:41 +00:00
ServiceWorkerJobQueue.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/serviceworkers. r=dom-workers-and-storage-reviewers,janv 2020-02-12 10:52:29 +00:00
ServiceWorkerJobQueue.h
ServiceWorkerManager.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerManager.h Bug 1631685 - Replace MOZ_MUST_USE with [[nodiscard]] in dom/serviceworkers. r=dom-workers-and-storage-reviewers,sg 2020-04-21 11:07:58 +00:00
ServiceWorkerManagerChild.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerManagerChild.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/serviceworkers. r=dom-workers-and-storage-reviewers,janv 2020-02-12 10:52:29 +00:00
ServiceWorkerManagerParent.cpp Bug 1589708 - Restore propagateUnregister as API to wipe registrations. r=perry 2019-10-22 01:48:37 +00:00
ServiceWorkerManagerParent.h
ServiceWorkerManagerService.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerManagerService.h
ServiceWorkerOp.cpp Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8 2020-05-14 04:44:33 +00:00
ServiceWorkerOp.h Bug 1539498 - Make SerializedStructuredCloneBuffer move-only. r=asuth,jld,baku 2020-02-01 15:16:43 +00:00
ServiceWorkerOpArgs.ipdlh Bug 1611046 - add ServiceWorker shutdown progress tracking r=dom-workers-and-storage-reviewers,asuth 2020-01-29 10:08:35 +00:00
ServiceWorkerOpPromise.h Bug 1143478 - Rename mozilla::Pair to CompactPair. r=froydnj 2020-03-17 12:42:12 +00:00
ServiceWorkerParent.cpp
ServiceWorkerParent.h
ServiceWorkerPrivate.cpp Bug 1627892 - Make InternalRequest derive from SafeRefCounted. r=dom-workers-and-storage-reviewers,perry 2020-05-11 12:10:53 +00:00
ServiceWorkerPrivate.h Bug 1625138 - Part 34: Replace mozilla::FalseType with std::false_type. r=froydnj 2020-03-28 13:57:20 +00:00
ServiceWorkerPrivateImpl.cpp Backed out changeset e1be97ce43d1 (bug 1622451) for failures on browser_download_canceled.js. CLOSED TREE 2020-05-01 03:58:25 +03:00
ServiceWorkerPrivateImpl.h Bug 1611046 - add ServiceWorker shutdown progress tracking r=dom-workers-and-storage-reviewers,asuth 2020-01-29 10:08:35 +00:00
ServiceWorkerProxy.cpp Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika 2020-04-07 15:16:33 +00:00
ServiceWorkerProxy.h
ServiceWorkerRegisterJob.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/serviceworkers. r=dom-workers-and-storage-reviewers,janv 2020-02-12 10:52:29 +00:00
ServiceWorkerRegisterJob.h
ServiceWorkerRegistrar.cpp Bug 1626570 - Improve handling of copying arrays in dom/serviceworkers/. r=dom-workers-and-storage-reviewers,ytausky 2020-05-11 08:22:14 +00:00
ServiceWorkerRegistrar.h Bug 1620632 - Ensure nsTArray_Impl only declares a copy-constructor/assignment operator if E is copy-constructible. r=froydnj 2020-03-20 17:13:51 +00:00
ServiceWorkerRegistrarTypes.ipdlh
ServiceWorkerRegistration.cpp Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug 2020-03-06 21:08:02 +00:00
ServiceWorkerRegistration.h Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorkerRegistrationChild.cpp
ServiceWorkerRegistrationChild.h
ServiceWorkerRegistrationDescriptor.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerRegistrationDescriptor.h Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerRegistrationImpl.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerRegistrationImpl.h Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorkerRegistrationInfo.cpp Bug 1626570 - Improve handling of copying arrays in dom/serviceworkers/. r=dom-workers-and-storage-reviewers,ytausky 2020-05-11 08:22:14 +00:00
ServiceWorkerRegistrationInfo.h Bug 1595964 Part 1 - Add nsIServiceWorkerRegistrationInfo.evaluatingWorker, r=asuth. 2019-12-07 18:18:07 +00:00
ServiceWorkerRegistrationListener.h
ServiceWorkerRegistrationParent.cpp Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorkerRegistrationParent.h Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorkerRegistrationProxy.cpp Bug 1620594 - Part 3: Use default target for timers using SystemGroup. r=nika 2020-04-07 15:16:46 +00:00
ServiceWorkerRegistrationProxy.h Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorkerScriptCache.cpp Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika 2020-04-07 15:17:07 +00:00
ServiceWorkerScriptCache.h Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan 2019-12-06 09:24:56 +00:00
ServiceWorkerShutdownBlocker.cpp Bug 1588152 - allow unclean ServiceWorker shutdown on beta/release builds r=asuth 2020-02-20 23:42:50 +00:00
ServiceWorkerShutdownBlocker.h Bug 1588152 - allow unclean ServiceWorker shutdown on beta/release builds r=asuth 2020-02-20 23:42:50 +00:00
ServiceWorkerShutdownState.cpp Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika 2020-04-07 15:16:33 +00:00
ServiceWorkerShutdownState.h Bug 1611046 - add ServiceWorker shutdown progress tracking r=dom-workers-and-storage-reviewers,asuth 2020-01-29 10:08:35 +00:00
ServiceWorkerUnregisterCallback.cpp
ServiceWorkerUnregisterCallback.h
ServiceWorkerUnregisterJob.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/serviceworkers. r=dom-workers-and-storage-reviewers,janv 2020-02-12 10:52:29 +00:00
ServiceWorkerUnregisterJob.h
ServiceWorkerUpdateJob.cpp Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug 2020-03-06 21:08:02 +00:00
ServiceWorkerUpdateJob.h Bug 1604943 - ServiceWorkerRegistration.update should capture newest worker script URL at call-time r=dom-workers-and-storage-reviewers,asuth 2020-01-08 03:21:27 +00:00
ServiceWorkerUpdaterChild.cpp
ServiceWorkerUpdaterChild.h
ServiceWorkerUpdaterParent.cpp
ServiceWorkerUpdaterParent.h
ServiceWorkerUtils.cpp Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb 2020-05-12 19:02:05 +00:00
ServiceWorkerUtils.h Bug 1626570 - Improve handling of copying arrays in dom/serviceworkers/. r=dom-workers-and-storage-reviewers,ytausky 2020-05-11 08:22:14 +00:00