gecko-dev/dom/serviceworkers
Perry Jiang c0d0830d63 Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth
In ServiceWorkerPrivateImpl::SendFetchEvent, a heap-allocated AutoIPCStream can
point to a stack-allocated IPCStream (part of an IPCInternalRequest). If this
IPCStream is destroyed before the AutoIPCStream, the AutoIPCStream will have a
dangling pointer (and this is the case if SendFetchEvent is called when the
Service Worker's state is "activating" rather than "activated").

This patch moves around the logic to handle the AutoIPCStream's lifetime to
ensure it its lifetime is within its IPCStream's lifetime. The larger issue
might be that AutoIPCStream doesn't have inherent lifetime guarantees (it'll
definitely outlive its IPCStream if it points to its embedded one, but it
doesn't own any external IPCStreams it might point to).

Differential Revision: https://phabricator.services.mozilla.com/D48935

--HG--
extra : moz-landing-system : lando
2019-10-11 23:22:31 +00:00
..
test Bug 1546112 - Remove the code for XMLDocument.load/async; r=smaug 2019-10-10 18:20:34 +00:00
FetchEventOpChild.cpp Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth 2019-10-11 23:22:31 +00:00
FetchEventOpChild.h Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth 2019-10-11 23:22:31 +00:00
FetchEventOpParent.cpp Bug 1231213 - Implement PFetchEventOp(Proxy) IPDL protocols and FetchEventOp(Proxy){Parent,Child}. r=asuth 2019-08-15 17:27:07 +00:00
FetchEventOpParent.h Bug 1231213 - Implement PFetchEventOp(Proxy) IPDL protocols and FetchEventOp(Proxy){Parent,Child}. r=asuth 2019-08-15 17:27:07 +00:00
FetchEventOpProxyChild.cpp Bug 1231213 - Implement ServiceWorkerOp and its subclasses. r=asuth 2019-08-15 17:27:08 +00:00
FetchEventOpProxyChild.h Bug 1231213 - Implement ServiceWorkerOp and its subclasses. r=asuth 2019-08-15 17:27:08 +00:00
FetchEventOpProxyParent.cpp Bug 1231213 - Implement PFetchEventOp(Proxy) IPDL protocols and FetchEventOp(Proxy){Parent,Child}. r=asuth 2019-08-15 17:27:07 +00:00
FetchEventOpProxyParent.h Bug 1231213 - Implement PFetchEventOp(Proxy) IPDL protocols and FetchEventOp(Proxy){Parent,Child}. r=asuth 2019-08-15 17:27:07 +00:00
IPCServiceWorkerDescriptor.ipdlh Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
IPCServiceWorkerRegistrationDescriptor.ipdlh Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
PFetchEventOp.ipdl Bug 1231213 - Implement PFetchEventOp(Proxy) IPDL protocols and FetchEventOp(Proxy){Parent,Child}. r=asuth 2019-08-15 17:27:07 +00:00
PFetchEventOpProxy.ipdl Bug 1231213 - Implement PFetchEventOp(Proxy) IPDL protocols and FetchEventOp(Proxy){Parent,Child}. r=asuth 2019-08-15 17:27:07 +00:00
PServiceWorker.ipdl
PServiceWorkerContainer.ipdl
PServiceWorkerManager.ipdl
PServiceWorkerRegistration.ipdl
PServiceWorkerUpdater.ipdl
RemoteServiceWorkerContainerImpl.cpp Bug 1559919 - Finish the WorkerHolder cleanup - part 4 - IPCWorkerRef in ServiceWorkerContainerChild, r=asuth 2019-07-12 11:16:15 +00:00
RemoteServiceWorkerContainerImpl.h
RemoteServiceWorkerImpl.cpp Bug 1559919 - Finish the WorkerHolder cleanup - part 6 - IPCWorkerRef in ServiceWorkerChild, r=asuth 2019-07-12 11:16:52 +00:00
RemoteServiceWorkerImpl.h
RemoteServiceWorkerRegistrationImpl.cpp Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
RemoteServiceWorkerRegistrationImpl.h
ServiceWorker.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
ServiceWorker.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
ServiceWorkerActors.cpp
ServiceWorkerActors.h
ServiceWorkerChild.cpp Bug 1559919 - Finish the WorkerHolder cleanup - part 6 - IPCWorkerRef in ServiceWorkerChild, r=asuth 2019-07-12 11:16:52 +00:00
ServiceWorkerChild.h Bug 1559919 - Finish the WorkerHolder cleanup - part 6 - IPCWorkerRef in ServiceWorkerChild, r=asuth 2019-07-12 11:16:52 +00:00
ServiceWorkerCloneData.cpp
ServiceWorkerCloneData.h
ServiceWorkerContainer.cpp Bug 1563139 - Remove StaticPrefs.h. r=glandium 2019-07-26 01:10:23 +00:00
ServiceWorkerContainer.h Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
ServiceWorkerContainerChild.cpp Bug 1559919 - Finish the WorkerHolder cleanup - part 4 - IPCWorkerRef in ServiceWorkerContainerChild, r=asuth 2019-07-12 11:16:15 +00:00
ServiceWorkerContainerChild.h Bug 1559919 - Finish the WorkerHolder cleanup - part 4 - IPCWorkerRef in ServiceWorkerContainerChild, r=asuth 2019-07-12 11:16:15 +00:00
ServiceWorkerContainerImpl.cpp Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
ServiceWorkerContainerImpl.h
ServiceWorkerContainerParent.cpp Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
ServiceWorkerContainerParent.h
ServiceWorkerContainerProxy.cpp
ServiceWorkerContainerProxy.h
ServiceWorkerDescriptor.cpp
ServiceWorkerDescriptor.h
ServiceWorkerEvents.cpp Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
ServiceWorkerEvents.h Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
ServiceWorkerIPCUtils.h
ServiceWorkerImpl.cpp
ServiceWorkerImpl.h
ServiceWorkerInfo.cpp Bug 1552945 - Allow a WorkerPrivate's creator to set its ID. r=asuth 2019-08-20 15:20:40 +00:00
ServiceWorkerInfo.h Bug 1552945 - Allow a WorkerPrivate's creator to set its ID. r=asuth 2019-08-20 15:20:40 +00:00
ServiceWorkerInterceptController.cpp Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb 2019-07-08 16:37:45 +00:00
ServiceWorkerInterceptController.h
ServiceWorkerJob.cpp Bug 1581315 part 3. Add MOZ_MUST_RETURN_FROM_CALLER_IF_THIS_IS_ARG to more ErrorResult methods. r=smaug 2019-09-20 02:19:18 +00:00
ServiceWorkerJob.h
ServiceWorkerJobQueue.cpp
ServiceWorkerJobQueue.h
ServiceWorkerManager.cpp Bug 1456995 - shutdown unregistered Service Workers on browser shutdown r=asuth 2019-10-08 23:47:57 +00:00
ServiceWorkerManager.h Bug 1456995 - reduce access levels for member variables/methods in ServiceWorkerManager r=asuth 2019-10-08 23:48:01 +00:00
ServiceWorkerManagerChild.cpp
ServiceWorkerManagerChild.h Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj 2019-02-06 15:58:43 +00:00
ServiceWorkerManagerParent.cpp
ServiceWorkerManagerParent.h Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj 2019-02-06 15:58:43 +00:00
ServiceWorkerManagerService.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ServiceWorkerManagerService.h
ServiceWorkerOp.cpp Bug 1578173 part 4. Switch event subclasses to constructor operations. r=smaug 2019-09-11 14:35:28 +00:00
ServiceWorkerOp.h Bug 1231213 - Implement ServiceWorkerOp and its subclasses. r=asuth 2019-08-15 17:27:08 +00:00
ServiceWorkerOpArgs.ipdlh Bug 1231213 - Implement ServiceWorkerOp{Args,Promise,Result}, FetchEventRespondWith{Promise,Result}, and IPCFetchEventRespondWithResult. r=asuth 2019-08-15 17:26:22 +00:00
ServiceWorkerOpPromise.h Bug 1231213 - Implement ServiceWorkerOp{Args,Promise,Result}, FetchEventRespondWith{Promise,Result}, and IPCFetchEventRespondWithResult. r=asuth 2019-08-15 17:26:22 +00:00
ServiceWorkerParent.cpp
ServiceWorkerParent.h
ServiceWorkerPrivate.cpp Bug 1562663 - P3 - Have agent cluster Ids for workers; r=perry,nika 2019-09-23 09:57:23 +00:00
ServiceWorkerPrivate.h Bug 1552945 - Start Service Workers in the parent process with parent-intercept. r=asuth,jdescottes 2019-08-20 15:21:11 +00:00
ServiceWorkerPrivateImpl.cpp Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth 2019-10-11 23:22:31 +00:00
ServiceWorkerPrivateImpl.h Bug 1578919 - Don't allow AutoIPCStream to outlive its IPCStream r=asuth 2019-10-11 23:22:31 +00:00
ServiceWorkerProxy.cpp
ServiceWorkerProxy.h
ServiceWorkerRegisterJob.cpp Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerRegisterJob.h Bug 1527000 - Stop passing a null or empty nsILoadGroup to ServiceWorker CompareNetwork, r=asuth 2019-02-15 04:56:12 +00:00
ServiceWorkerRegistrar.cpp Bug 965637: Move CSP from Principal into Client, part 2: worker changes. r=baku 2019-05-21 23:14:50 +00:00
ServiceWorkerRegistrar.h
ServiceWorkerRegistrarTypes.ipdlh
ServiceWorkerRegistration.cpp Bug 1231213 - Update the update algorithm to better match the spec r=asuth 2019-08-15 17:27:51 +00:00
ServiceWorkerRegistration.h Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerRegistrationChild.cpp Bug 1231213 - Properly declare some dependencies so everything will compile with additional files. r=asuth 2019-08-15 17:25:44 +00:00
ServiceWorkerRegistrationChild.h Bug 1559919 - Finish the WorkerHolder cleanup - part 5 - IPCWorkerRef in ServiceWorkerRegistrationChild, r=asuth 2019-07-12 11:16:34 +00:00
ServiceWorkerRegistrationDescriptor.cpp Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
ServiceWorkerRegistrationDescriptor.h Bug 1534364 - replace OptionalIPCServiceWorkerDescriptor with IPCServiceWorkerDescriptor? in IPDL: r=valentin 2019-03-15 12:55:10 +00:00
ServiceWorkerRegistrationImpl.cpp Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerRegistrationImpl.h Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerRegistrationInfo.cpp Bug 1581187 - only shutdown remote Service Workers on browser shutdown r=asuth 2019-10-03 09:58:46 +00:00
ServiceWorkerRegistrationInfo.h Bug 1581187 - only shutdown remote Service Workers on browser shutdown r=asuth 2019-10-03 09:58:46 +00:00
ServiceWorkerRegistrationListener.h Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerRegistrationParent.cpp
ServiceWorkerRegistrationParent.h
ServiceWorkerRegistrationProxy.cpp Bug 1231213 - Allow the delayed ServiceWorkerRegistration.update() mechanism to handle multiple simultaneous requests without timing out. r=asuth 2019-08-15 17:27:44 +00:00
ServiceWorkerRegistrationProxy.h Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerScriptCache.cpp Bug 1565688. Remove unused IOService arg from NS_NewURI. r=mayhemer 2019-07-15 13:39:51 +00:00
ServiceWorkerScriptCache.h Bug 1531263 - Wrong prototype for Compare() function in ServiceWorkerScriptCache, r=asuth 2019-02-28 18:57:46 +00:00
ServiceWorkerShutdownBlocker.cpp Bug 1231213 - Implement ServiceWorkerShutdownBlocker. r=asuth 2019-08-15 17:26:29 +00:00
ServiceWorkerShutdownBlocker.h Bug 1231213 - Implement ServiceWorkerShutdownBlocker. r=asuth 2019-08-15 17:26:29 +00:00
ServiceWorkerUnregisterCallback.cpp
ServiceWorkerUnregisterCallback.h
ServiceWorkerUnregisterJob.cpp Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerUnregisterJob.h
ServiceWorkerUpdateJob.cpp Bug 1557244 - Disallow resurrection of unregistered ServiceWorkerRegistrations r=asuth 2019-07-26 18:41:48 +00:00
ServiceWorkerUpdateJob.h Bug 1527000 - Stop passing a null or empty nsILoadGroup to ServiceWorker CompareNetwork, r=asuth 2019-02-15 04:56:12 +00:00
ServiceWorkerUpdaterChild.cpp
ServiceWorkerUpdaterChild.h
ServiceWorkerUpdaterParent.cpp
ServiceWorkerUpdaterParent.h
ServiceWorkerUtils.cpp Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE 2019-08-02 12:17:42 +03:00
ServiceWorkerUtils.h
moz.build Bug 1231213 - Implement ServiceWorkerPrivateImpl to dispatch operations to content processes and respond to their results. r=asuth 2019-08-15 17:27:23 +00:00