gecko-dev/docshell/base
Nika Layzell d47f4a615c Bug 1725572 - Avoid process-switching to a dead process, r=kmag
After some investigation, I was able to find a theoretical codepath
which could lead to the "missing initial frame browsing context" error:

1. Two iframes are created for the same origin, and begin process
   switching.
2. The first iframe finishes process switching, but for some reason
   (e.g. being in shutdown) the call to `LaunchSubprocessResolve`
   errors.
3. The second callback is called and also calls LaunchSubprocessResolve,
   which this time returns `true` due to it previously having been
   called.
4. The BrowserParent is created in the new content process despite
   `InitInternal()` never having been finished, and therefore the
   ContentParent never becoming subscribed to the BrowsingContextGroup.

To fix this, I made 2 changes:

1. Abort from process switching if the target process which we're going
   to be creating a BrowserParent in `IsDead()`, and
2. Track the return value from `LaunchSubprocessResolve`, so we return
   `false` if it is called a second time after a failed content process
   launch.

I'm not confident that this is the cause of the crashes, as I was unable
to reproduce the issue.

Differential Revision: https://phabricator.services.mozilla.com/D123548
2021-08-25 17:54:10 +00:00
..
crashtests Bug 1690169 test. r=smaug 2021-08-13 08:11:25 +00:00
timeline Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai 2021-08-17 15:45:39 +00:00
BaseHistory.cpp Bug 1714614 - Send visited query results only to interested processes. r=mak,geckoview-reviewers,agi 2021-07-21 12:23:33 +00:00
BaseHistory.h Bug 1714614 - Send visited query results only to interested processes. r=mak,geckoview-reviewers,agi 2021-07-21 12:23:33 +00:00
BrowsingContext.cpp Bug 1719183 - part1 : use a count to generalize the usage of preventing page from being suspended. r=nika 2021-08-03 21:32:26 +00:00
BrowsingContext.h Bug 1704001 - Add a comment explaining HasLoadedNonInitialDocument for BrowsingContext.h, r=nika 2021-08-05 22:54:33 +00:00
BrowsingContextGroup.cpp Bug 1646532 - Move mAreDialogsEnabled, mLastDialogQuitTime and mDialogAbuseCount to BC group, r=nika 2021-07-12 17:53:53 +00:00
BrowsingContextGroup.h Bug 1646532 - Move mAreDialogsEnabled, mLastDialogQuitTime and mDialogAbuseCount to BC group, r=nika 2021-07-12 17:53:53 +00:00
BrowsingContextWebProgress.cpp Bug 1725145 - header files fixes in the hybrid build env. r=valentin 2021-08-22 10:21:55 +00:00
BrowsingContextWebProgress.h Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers 2021-06-03 16:59:32 +00:00
CanonicalBrowsingContext.cpp Bug 1725572 - Avoid process-switching to a dead process, r=kmag 2021-08-25 17:54:10 +00:00
CanonicalBrowsingContext.h Bug 1650089 - Part 3: Rework DocumentChannel-triggered process switches to support null principals, r=annyG,kmag 2021-08-10 14:31:17 +00:00
ChildProcessChannelListener.cpp
ChildProcessChannelListener.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
IHistory.h Bug 1714614 - Send visited query results only to interested processes. r=mak,geckoview-reviewers,agi 2021-07-21 12:23:33 +00:00
LoadContext.cpp
LoadContext.h
moz.build
nsAboutRedirector.cpp Bug 1496997 - Remove dom.serviceWorkers.parent_intercept pref r=asuth,dom-workers-and-storage-reviewers,perftest-reviewers,jgraham,sparky,webdriver-reviewers,whimboo 2021-06-15 08:52:39 +00:00
nsAboutRedirector.h
nsCTooltipTextProvider.h
nsDocShell.cpp Bug 1725489 - Add loadType flags to nsITopLevelNavigationDelegate.shouldNavigate. r=smaug 2021-08-13 13:59:28 +00:00
nsDocShell.h Bug 1724905 - Remove native only updateURLAndHistory in nsIDocShell; r=smaug 2021-08-10 22:15:09 +00:00
nsDocShellEditorData.cpp Bug 1676702 - part 2: Make TextControlState initialize TextEditor with PasswordMaskData r=m_kato 2021-06-28 04:37:54 +00:00
nsDocShellEditorData.h
nsDocShellEnumerator.cpp
nsDocShellEnumerator.h
nsDocShellLoadState.cpp Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag 2021-08-10 14:31:16 +00:00
nsDocShellLoadState.h Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag 2021-08-10 14:31:16 +00:00
nsDocShellLoadTypes.h
nsDocShellTelemetryUtils.cpp
nsDocShellTelemetryUtils.h
nsDocShellTreeOwner.cpp Bug 1706316 - Part 2: Remove nsIBaseWindow::setFocus; r=hsivonen 2021-05-10 20:05:12 +00:00
nsDocShellTreeOwner.h
nsDSURIContentListener.cpp Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw 2021-05-18 20:45:17 +00:00
nsDSURIContentListener.h
nsIContentViewer.idl Bug 1699837 - Make sure that remote iframes honor print settings. r=mattwoodrow 2021-06-13 09:16:53 +00:00
nsIContentViewerEdit.idl
nsIDocShell.idl Bug 1724905 - Remove native only updateURLAndHistory in nsIDocShell; r=smaug 2021-08-10 22:15:09 +00:00
nsIDocShellTreeItem.idl
nsIDocShellTreeOwner.idl
nsIDocumentLoaderFactory.idl
nsILoadContext.idl
nsILoadURIDelegate.idl
nsIPrivacyTransitionObserver.idl
nsIReflowObserver.idl
nsIRefreshURI.idl
nsIScrollObserver.h
nsITooltipListener.idl
nsITooltipTextProvider.idl
nsIURIFixup.idl
nsIWebNavigation.idl Bug 1708150 - Add user activation flag to reload, goBack and goForward r=ckerschb,Gijs,smaug 2021-04-28 11:26:49 +00:00
nsIWebNavigationInfo.idl
nsIWebPageDescriptor.idl
nsPingListener.cpp
nsPingListener.h
nsRefreshTimer.cpp
nsRefreshTimer.h
nsWebNavigationInfo.cpp Bug 1695404 - follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel 2021-04-17 22:21:19 +00:00
nsWebNavigationInfo.h
SerializedLoadContext.cpp
SerializedLoadContext.h
SyncedContext.h
SyncedContextInlines.h
URIFixup.jsm Bug 1664814: Stop to use regex that identifies string that is uri like. r=adw,Gijs 2021-08-24 10:39:24 +00:00
WindowContext.cpp Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio 2021-06-17 11:00:22 +00:00
WindowContext.h Bug 1646560: Part 2 - Move allowJavascript and friends from DocShell to BrowsingContext and WindowContext. r=jdescottes,nika,geckoview-reviewers,devtools-backward-compat-reviewers,agi 2021-06-15 04:40:11 +00:00