From 26f640b36b88c64cb101323799148a1d3e360a8e Mon Sep 17 00:00:00 2001
From: Andreea Pavel
Date: Tue, 10 Apr 2018 05:11:36 +0300
Subject: [PATCH] Backed out 4 changesets (bug 1366808) for Windows GPU
leakchecks on a CLOSED TREE
Backed out changeset 23f60e5acaa2 (bug 1366808)
Backed out changeset bf2262b6aca8 (bug 1366808)
Backed out changeset 1fc82af3a155 (bug 1366808)
Backed out changeset 0649f0d9884b (bug 1366808)
---
browser/base/content/aboutRestartRequired.js | 33 ----------
.../base/content/aboutRestartRequired.xhtml | 56 -----------------
browser/base/content/tabbrowser.js | 13 +---
browser/base/jar.mn | 2 -
browser/components/about/AboutRedirector.cpp | 2 -
browser/components/build/nsModule.cpp | 1 -
.../chrome/browser/aboutRestartRequired.dtd | 13 ----
browser/locales/jar.mn | 1 -
browser/modules/ContentCrashHandlers.jsm | 32 ++--------
.../themes/shared/aboutRestartRequired.css | 41 -------------
browser/themes/shared/jar.inc.mn | 1 -
docshell/base/nsDocShell.cpp | 10 ---
dom/ipc/ContentChild.cpp | 10 +--
dom/ipc/ContentChild.h | 1 -
dom/ipc/ContentParent.cpp | 4 --
dom/ipc/ContentProcess.cpp | 11 +---
dom/ipc/TabParent.cpp | 14 ++---
gfx/ipc/GPUParent.cpp | 10 +--
gfx/ipc/GPUParent.h | 1 -
gfx/ipc/GPUProcessImpl.cpp | 7 ---
ipc/glue/MessageChannel.cpp | 61 ++++++++++---------
ipc/glue/MessageChannel.h | 5 +-
ipc/glue/ProtocolUtils.h | 13 ++--
js/xpconnect/src/xpc.msg | 1 -
netwerk/base/nsILoadInfo.idl | 2 +-
toolkit/components/telemetry/Histograms.json | 9 ---
.../telemetry/histogram-whitelists.json | 1 -
xpcom/base/ErrorList.py | 3 -
28 files changed, 55 insertions(+), 303 deletions(-)
delete mode 100644 browser/base/content/aboutRestartRequired.js
delete mode 100644 browser/base/content/aboutRestartRequired.xhtml
delete mode 100644 browser/locales/en-US/chrome/browser/aboutRestartRequired.dtd
delete mode 100644 browser/themes/shared/aboutRestartRequired.css
diff --git a/browser/base/content/aboutRestartRequired.js b/browser/base/content/aboutRestartRequired.js
deleted file mode 100644
index f30b6f61e932..000000000000
--- a/browser/base/content/aboutRestartRequired.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* eslint-env mozilla/frame-script */
-ChromeUtils.import("resource://gre/modules/Services.jsm");
-
-var AboutRestartRequired = {
- /* Only do autofocus if we're the toplevel frame; otherwise we
- don't want to call attention to ourselves! The key part is
- that autofocus happens on insertion into the tree, so we
- can remove the button, add @autofocus, and reinsert the
- button.
- */
- addAutofocus() {
- if (window.top == window) {
- var button = document.getElementById("restart");
- var parent = button.parentNode;
- button.remove();
- button.setAttribute("autofocus", "true");
- parent.insertAdjacentElement("afterbegin", button);
- }
- },
- restart() {
- Services.startup.quit(Ci.nsIAppStartup.eRestart |
- Ci.nsIAppStartup.eAttemptQuit);
- },
- init() {
- this.addAutofocus();
- },
-};
-
-AboutRestartRequired.init();
diff --git a/browser/base/content/aboutRestartRequired.xhtml b/browser/base/content/aboutRestartRequired.xhtml
deleted file mode 100644
index fb8dc90c53f6..000000000000
--- a/browser/base/content/aboutRestartRequired.xhtml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
- %htmlDTD;
-
- %globalDTD;
-
- %brandDTD;
-
- %restartRequiredDTD;
-]>
-
-
-
- &restartRequired.title;
-
-
-
-
-
-
-
-
-
-
-
&restartRequired.header;
-
-
-
&restartRequired.description;
-
-
-
-
-
-
-
-
-
-
diff --git a/browser/base/content/tabbrowser.js b/browser/base/content/tabbrowser.js
index 454029cdec23..c28feee76775 100644
--- a/browser/base/content/tabbrowser.js
+++ b/browser/base/content/tabbrowser.js
@@ -4053,7 +4053,7 @@ window._gBrowser = {
let tab = this.getTabForBrowser(browser);
if (this.selectedBrowser == browser) {
- TabCrashHandler.onSelectedBrowserCrash(browser, false);
+ TabCrashHandler.onSelectedBrowserCrash(browser);
} else {
this.updateBrowserRemoteness(browser, false);
SessionStore.reviveCrashedTab(tab);
@@ -4063,17 +4063,6 @@ window._gBrowser = {
this.setIcon(tab, icon, browser.contentPrincipal, browser.contentRequestContextID);
});
- this.addEventListener("oop-browser-buildid-mismatch", (event) => {
- if (!event.isTrusted)
- return;
-
- let browser = event.originalTarget;
-
- if (this.selectedBrowser == browser) {
- TabCrashHandler.onSelectedBrowserCrash(browser, true);
- }
- });
-
this.addEventListener("DOMAudioPlaybackStarted", (event) => {
var tab = this.getTabFromAudioEvent(event);
if (!tab) {
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
index c88986344241..e2d28ac8d223 100644
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -39,8 +39,6 @@ browser.jar:
content/browser/illustrations/error-server-not-found.svg (content/illustrations/error-server-not-found.svg)
content/browser/illustrations/error-malformed-url.svg (content/illustrations/error-malformed-url.svg)
content/browser/aboutNetError.xhtml (content/aboutNetError.xhtml)
- content/browser/aboutRestartRequired.js (content/aboutRestartRequired.js)
- content/browser/aboutRestartRequired.xhtml (content/aboutRestartRequired.xhtml)
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
index c49bd7f827f1..cb831fb89490 100644
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -99,8 +99,6 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT |
nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
nsIAboutModule::HIDE_FROM_ABOUTABOUT },
- { "restartrequired", "chrome://browser/content/aboutRestartRequired.xhtml",
- nsIAboutModule::ALLOW_SCRIPT },
};
static nsAutoCString
diff --git a/browser/components/build/nsModule.cpp b/browser/components/build/nsModule.cpp
index ecc751faf48b..d4070832fda3 100644
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -106,7 +106,6 @@ static const mozilla::Module::ContractIDEntry kBrowserContracts[] = {
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "preferences", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "downloads", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
{ NS_ABOUT_MODULE_CONTRACTID_PREFIX "reader", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
- { NS_ABOUT_MODULE_CONTRACTID_PREFIX "restartrequired", &kNS_BROWSER_ABOUT_REDIRECTOR_CID },
#if defined(XP_WIN)
{ NS_IEHISTORYENUMERATOR_CONTRACTID, &kNS_WINIEHISTORYENUMERATOR_CID },
#elif defined(XP_MACOSX)
diff --git a/browser/locales/en-US/chrome/browser/aboutRestartRequired.dtd b/browser/locales/en-US/chrome/browser/aboutRestartRequired.dtd
deleted file mode 100644
index 2f1159113fda..000000000000
--- a/browser/locales/en-US/chrome/browser/aboutRestartRequired.dtd
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-We have just installed an update in the background. Click Restart Firefox to finish applying it.
-We will restore all your pages, windows and tabs afterwards, so you can be on your way quickly.
-">
-
-
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
index c6d8b614a42b..52a06eb65fdc 100644
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -18,7 +18,6 @@
locale/browser/aboutRobots.dtd (%chrome/browser/aboutRobots.dtd)
locale/browser/aboutHome.dtd (%chrome/browser/aboutHome.dtd)
locale/browser/accounts.properties (%chrome/browser/accounts.properties)
- locale/browser/aboutRestartRequired.dtd (%chrome/browser/aboutRestartRequired.dtd)
locale/browser/aboutSearchReset.dtd (%chrome/browser/aboutSearchReset.dtd)
locale/browser/aboutSessionRestore.dtd (%chrome/browser/aboutSessionRestore.dtd)
locale/browser/aboutTabCrashed.dtd (%chrome/browser/aboutTabCrashed.dtd)
diff --git a/browser/modules/ContentCrashHandlers.jsm b/browser/modules/ContentCrashHandlers.jsm
index bef03a08a5ae..bbd9476e12e3 100644
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -229,13 +229,9 @@ var TabCrashHandler = {
let sentBrowser = false;
for (let weakBrowser of browserQueue) {
- let browser = weakBrowser.browser.get();
+ let browser = weakBrowser.get();
if (browser) {
- if (weakBrowser.restartRequired) {
- this.sendToRestartRequiredPage(browser);
- } else {
- this.sendToTabCrashedPage(browser);
- }
+ this.sendToTabCrashedPage(browser);
sentBrowser = true;
}
}
@@ -250,10 +246,8 @@ var TabCrashHandler = {
*
* @param browser ()
* The selected browser that just crashed.
- * @param restartRequired (bool)
- * Whether or not a browser restart is required to recover.
*/
- onSelectedBrowserCrash(browser, restartRequired) {
+ onSelectedBrowserCrash(browser) {
if (!browser.isRemoteBrowser) {
Cu.reportError("Selected crashed browser is not remote.");
return;
@@ -275,8 +269,7 @@ var TabCrashHandler = {
// this queue will be flushed. The weak reference is to avoid
// leaking browsers in case anything goes wrong during this
// teardown process.
- browserQueue.push({browser: Cu.getWeakReference(browser),
- restartRequired});
+ browserQueue.push(Cu.getWeakReference(browser));
},
/**
@@ -319,23 +312,6 @@ var TabCrashHandler = {
return false;
},
- sendToRestartRequiredPage(browser) {
- let uri = browser.currentURI;
- let gBrowser = browser.ownerGlobal.gBrowser;
- let tab = gBrowser.getTabForBrowser(browser);
- // The restart required page is non-remote by default.
- gBrowser.updateBrowserRemoteness(browser, false);
-
- browser.docShell.displayLoadError(Cr.NS_ERROR_BUILDID_MISMATCH, uri, null);
- tab.setAttribute("crashed", true);
-
- // Make sure to only count once even if there are multiple windows
- // that will all show about:restartrequired.
- if (this._crashedTabCount == 1) {
- Services.telemetry.getHistogramById("FX_CONTENT_BUILDID_MISMATCH").add(1);
- }
- },
-
/**
* We show a special page to users when a normal browser tab has crashed.
* This method should be called to send a browser to that page once the
diff --git a/browser/themes/shared/aboutRestartRequired.css b/browser/themes/shared/aboutRestartRequired.css
deleted file mode 100644
index cf612c300edd..000000000000
--- a/browser/themes/shared/aboutRestartRequired.css
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-@import url("chrome://browser/skin/error-pages.css");
-
-.illustrated #errorPageContainer {
- min-height: 300px;
- display: flex;
- flex-direction: column;
- background-position: left center;
-}
-
-body[dir="rtl"] #errorPageContainer {
- background-position: right center;
-}
-
-#header {
- background: none;
- padding-inline-start: 0;
- margin-inline-start: 0;
-}
-
-#text-container {
- margin: auto;
- padding-inline-start: 38%;
-}
-
-#errorPageContainer {
- min-height: 350px;
- display: flex;
- flex-direction: column;
- background-position: left center;
- background-repeat: no-repeat;
- background-size: 38%;
- background-image: url("chrome://browser/content/illustrations/error-connection-failure.svg");
-}
-
-#restart {
- margin-top: 1.2em;
-}
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
index ef89f8a47b52..70e5ec4fa861 100644
--- a/browser/themes/shared/jar.inc.mn
+++ b/browser/themes/shared/jar.inc.mn
@@ -10,7 +10,6 @@
skin/classic/browser/aboutNetError.css (../shared/aboutNetError.css)
skin/classic/browser/blockedSite.css (../shared/blockedSite.css)
skin/classic/browser/error-pages.css (../shared/error-pages.css)
- skin/classic/browser/aboutRestartRequired.css (../shared/aboutRestartRequired.css)
* skin/classic/browser/aboutSessionRestore.css (../shared/aboutSessionRestore.css)
skin/classic/browser/aboutTabCrashed.css (../shared/aboutTabCrashed.css)
skin/classic/browser/aboutWelcomeBack.css (../shared/aboutWelcomeBack.css)
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index 2f34cccd4a48..027161527cc0 100644
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4745,16 +4745,6 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
element->GetAttribute(NS_LITERAL_STRING("crashedPageTitle"), messageStr);
}
- // DisplayLoadError requires a non-empty messageStr to proceed and call
- // LoadErrorPage. If the page doesn't have a title, we will use a blank
- // space which will be trimmed and thus treated as empty by the front-end.
- if (messageStr.IsEmpty()) {
- messageStr.AssignLiteral(u" ");
- }
- } else if (NS_ERROR_BUILDID_MISMATCH == aError) {
- errorPage.AssignLiteral("restartrequired");
- error = "restartrequired";
-
// DisplayLoadError requires a non-empty messageStr to proceed and call
// LoadErrorPage. If the page doesn't have a title, we will use a blank
// space which will be trimmed and thus treated as empty by the front-end.
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
index b2a03c67151f..51df869f399b 100644
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -607,7 +607,6 @@ ContentChild::RecvSetXPCOMProcessAttributes(const XPCOMInitData& aXPCOMInit,
bool
ContentChild::Init(MessageLoop* aIOLoop,
base::ProcessId aParentPid,
- const char* aParentBuildID,
IPC::Channel* aChannel,
uint64_t aChildID,
bool aIsForBrowser)
@@ -676,15 +675,10 @@ ContentChild::Init(MessageLoop* aIOLoop,
GetIPCChannel()->SetChannelFlags(MessageChannel::REQUIRE_A11Y_REENTRY);
#endif
- // This must be checked before any IPDL message, which may hit sentinel
+ // This must be sent before any IPDL message, which may hit sentinel
// errors due to parent and content processes having different
// versions.
- MessageChannel* channel = GetIPCChannel();
- if (channel && !channel->SendBuildIDsMatchMessage(aParentBuildID)) {
- // We need to quit this process if the buildID doesn't match the parent's.
- // This can occur when an update occurred in the background.
- ProcessChild::QuickExit();
- }
+ GetIPCChannel()->SendBuildID();
#ifdef MOZ_X11
if (!gfxPlatform::IsHeadless()) {
diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h
index ca6be541a19a..f73124bcff13 100644
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -120,7 +120,6 @@ public:
bool Init(MessageLoop* aIOLoop,
base::ProcessId aParentPid,
- const char* aParentBuildID,
IPC::Channel* aChannel,
uint64_t aChildID,
bool aIsForBrowser);
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp
index 536073f675b9..0bff52c7b28b 100644
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2055,10 +2055,6 @@ ContentParent::LaunchSubprocess(ProcessPriority aInitialPriority /* = PROCESS_PR
extraArgs.push_back("-safeMode");
}
- nsCString parentBuildID(mozilla::PlatformBuildID());
- extraArgs.push_back("-parentBuildID");
- extraArgs.push_back(parentBuildID.get());
-
SetOtherProcessId(kInvalidProcessId, ProcessIdState::ePending);
if (!mSubprocess->Launch(extraArgs)) {
NS_ERROR("failed to launch child in the parent");
diff --git a/dom/ipc/ContentProcess.cpp b/dom/ipc/ContentProcess.cpp
index a2750a9c77d8..e4c02ea8be28 100644
--- a/dom/ipc/ContentProcess.cpp
+++ b/dom/ipc/ContentProcess.cpp
@@ -99,7 +99,6 @@ ContentProcess::Init(int aArgc, char* aArgv[])
Maybe prefsHandle;
Maybe prefsLen;
Maybe schedulerPrefs;
- Maybe parentBuildID;
#if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
nsCOMPtr profileDir;
#endif
@@ -169,12 +168,6 @@ ContentProcess::Init(int aArgc, char* aArgv[])
} else if (strcmp(aArgv[i], "-safeMode") == 0) {
gSafeMode = true;
- } else if (strcmp(aArgv[i], "-parentBuildID") == 0) {
- if (++i == aArgc) {
- return false;
- }
- parentBuildID = Some(aArgv[i]);
-
#if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
} else if (strcmp(aArgv[i], "-profile") == 0) {
if (++i == aArgc) {
@@ -204,8 +197,7 @@ ContentProcess::Init(int aArgc, char* aArgv[])
isForBrowser.isNothing() ||
prefsHandle.isNothing() ||
prefsLen.isNothing() ||
- schedulerPrefs.isNothing() ||
- parentBuildID.isNothing()) {
+ schedulerPrefs.isNothing()) {
return false;
}
@@ -225,7 +217,6 @@ ContentProcess::Init(int aArgc, char* aArgv[])
Scheduler::SetPrefs(*schedulerPrefs);
mContent.Init(IOThreadChild::message_loop(),
ParentPid(),
- *parentBuildID,
IOThreadChild::channel(),
*childID,
*isForBrowser);
diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp
index 1c8c706c60f7..d18002c067f8 100644
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -468,16 +468,10 @@ TabParent::ActorDestroy(ActorDestroyReason why)
// and created a new frameloader. If so, we don't fire the event,
// since the frameloader owner has clearly moved on.
if (currentFrameLoader == frameLoader) {
- MessageChannel* channel = GetIPCChannel();
- if (channel && !channel->DoBuildIDsMatch()) {
- nsContentUtils::DispatchTrustedEvent(
- frameElement->OwnerDoc(), frameElement,
- NS_LITERAL_STRING("oop-browser-buildid-mismatch"), true, true);
- } else {
- nsContentUtils::DispatchTrustedEvent(
- frameElement->OwnerDoc(), frameElement,
- NS_LITERAL_STRING("oop-browser-crashed"), true, true);
- }
+ nsContentUtils::DispatchTrustedEvent(frameElement->OwnerDoc(), frameElement,
+ NS_LITERAL_STRING("oop-browser-crashed"),
+ true, true);
+
}
}
}
diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp
index 92ef29ea53e9..2519d84919e0 100644
--- a/gfx/ipc/GPUParent.cpp
+++ b/gfx/ipc/GPUParent.cpp
@@ -84,7 +84,6 @@ GPUParent::GetSingleton()
bool
GPUParent::Init(base::ProcessId aParentPid,
- const char* aParentBuildID,
MessageLoop* aIOLoop,
IPC::Channel* aChannel)
{
@@ -101,15 +100,10 @@ GPUParent::Init(base::ProcessId aParentPid,
nsDebugImpl::SetMultiprocessMode("GPU");
- // This must be checked before any IPDL message, which may hit sentinel
+ // This must be sent before any IPDL message, which may hit sentinel
// errors due to parent and content processes having different
// versions.
- MessageChannel* channel = GetIPCChannel();
- if (channel && !channel->SendBuildIDsMatchMessage(aParentBuildID)) {
- // We need to quit this process if the buildID doesn't match the parent's.
- // This can occur when an update occurred in the background.
- ProcessChild::QuickExit();
- }
+ GetIPCChannel()->SendBuildID();
// Init crash reporter support.
CrashReporterClient::InitSingleton(this);
diff --git a/gfx/ipc/GPUParent.h b/gfx/ipc/GPUParent.h
index 97e6447e1ab0..f85f1be565b6 100644
--- a/gfx/ipc/GPUParent.h
+++ b/gfx/ipc/GPUParent.h
@@ -27,7 +27,6 @@ public:
static GPUParent* GetSingleton();
bool Init(base::ProcessId aParentPid,
- const char* aParentBuildID,
MessageLoop* aIOLoop,
IPC::Channel* aChannel);
void NotifyDeviceReset();
diff --git a/gfx/ipc/GPUProcessImpl.cpp b/gfx/ipc/GPUProcessImpl.cpp
index aa1c0926e6b1..a067a0465f9c 100644
--- a/gfx/ipc/GPUProcessImpl.cpp
+++ b/gfx/ipc/GPUProcessImpl.cpp
@@ -31,15 +31,8 @@ GPUProcessImpl::Init(int aArgc, char* aArgv[])
#if defined(MOZ_SANDBOX) && defined(OS_WIN)
mozilla::SandboxTarget::Instance()->StartSandbox();
#endif
- char* parentBuildID = nullptr;
- for (int idx = aArgc; idx > 0; idx--) {
- if (!strcmp(aArgv[idx], "-parentBuildID")) {
- parentBuildID = aArgv[idx + 1];
- }
- }
return mGPU.Init(ParentPid(),
- parentBuildID,
IOThreadChild::message_loop(),
IOThreadChild::channel());
}
diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp
index 56a161627139..bf800ce7cb06 100644
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -533,8 +533,7 @@ MessageChannel::MessageChannel(const char* aName,
mFlags(REQUIRE_DEFAULT),
mPeerPidSet(false),
mPeerPid(-1),
- mIsPostponingSends(false),
- mBuildIDsConfirmedMatch(false)
+ mIsPostponingSends(false)
{
MOZ_COUNT_CTOR(ipc::MessageChannel);
@@ -1001,38 +1000,29 @@ MessageChannel::RejectPendingResponsesForActor(ActorIdType aActorId)
}
}
-class BuildIDsMatchMessage : public IPC::Message
+class BuildIDMessage : public IPC::Message
{
public:
- BuildIDsMatchMessage()
- : IPC::Message(MSG_ROUTING_NONE, BUILD_IDS_MATCH_MESSAGE_TYPE)
+ BuildIDMessage()
+ : IPC::Message(MSG_ROUTING_NONE, BUILD_ID_MESSAGE_TYPE)
{
}
void Log(const std::string& aPrefix, FILE* aOutf) const
{
- fputs("(special `Build IDs match' message)", aOutf);
+ fputs("(special `Build ID' message)", aOutf);
}
};
-// Send the parent a special async message to confirm when the parent and child
-// are of the same buildID. Skips sending the message and returns false if the
-// buildIDs don't match. This is a minor variation on
-// MessageChannel::Send(Message* aMsg).
-bool
-MessageChannel::SendBuildIDsMatchMessage(const char* aParentBuildID)
+// Send the parent a special async message to allow it to detect if
+// this process is running a different build. This is a minor
+// variation on MessageChannel::Send(Message* aMsg).
+void
+MessageChannel::SendBuildID()
{
MOZ_ASSERT(!XRE_IsParentProcess());
-
- nsCString parentBuildID(aParentBuildID);
- nsCString childBuildID(mozilla::PlatformBuildID());
-
- if (parentBuildID != childBuildID) {
- // The build IDs didn't match, usually because an update occurred in the
- // background.
- return false;
- }
-
- nsAutoPtr msg(new BuildIDsMatchMessage());
+ nsAutoPtr msg(new BuildIDMessage());
+ nsCString buildID(mozilla::PlatformBuildID());
+ IPC::WriteParam(msg, buildID);
MOZ_RELEASE_ASSERT(!msg->is_sync());
MOZ_RELEASE_ASSERT(msg->nested_level() != IPC::Message::NESTED_INSIDE_SYNC);
@@ -1044,10 +1034,9 @@ MessageChannel::SendBuildIDsMatchMessage(const char* aParentBuildID)
MonitorAutoLock lock(*mMonitor);
if (!Connected()) {
ReportConnectionError("MessageChannel", msg);
- return false;
+ return;
}
mLink->SendMessage(msg.forget());
- return true;
}
class CancelMessage : public IPC::Message
@@ -1066,6 +1055,22 @@ public:
}
};
+MOZ_NEVER_INLINE static void
+CheckChildProcessBuildID(const IPC::Message& aMsg)
+{
+ MOZ_ASSERT(XRE_IsParentProcess());
+ nsCString childBuildID;
+ PickleIterator msgIter(aMsg);
+ MOZ_ALWAYS_TRUE(IPC::ReadParam(&aMsg, &msgIter, &childBuildID));
+ aMsg.EndRead(msgIter);
+
+ nsCString parentBuildID(mozilla::PlatformBuildID());
+
+ // This assert can fail if the child process has been updated
+ // to a newer version while the parent process was running.
+ MOZ_RELEASE_ASSERT(parentBuildID == childBuildID);
+}
+
bool
MessageChannel::MaybeInterceptSpecialIOMessage(const Message& aMsg)
{
@@ -1087,9 +1092,9 @@ MessageChannel::MaybeInterceptSpecialIOMessage(const Message& aMsg)
CancelTransaction(aMsg.transaction_id());
NotifyWorkerThread();
return true;
- } else if (BUILD_IDS_MATCH_MESSAGE_TYPE == aMsg.type()) {
- IPC_LOG("Build IDs match message");
- mBuildIDsConfirmedMatch = true;
+ } else if (BUILD_ID_MESSAGE_TYPE == aMsg.type()) {
+ IPC_LOG("Build ID message");
+ CheckChildProcessBuildID(aMsg);
return true;
}
}
diff --git a/ipc/glue/MessageChannel.h b/ipc/glue/MessageChannel.h
index 25375ff0278f..849dc25835e8 100644
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -238,8 +238,7 @@ private:
gUnresolvedResponses++;
}
- bool SendBuildIDsMatchMessage(const char* aParentBuildI);
- bool DoBuildIDsMatch() { return mBuildIDsConfirmedMatch; }
+ void SendBuildID();
// Asynchronously deliver a message back to this side of the
// channel
@@ -855,8 +854,6 @@ private:
// held in a queue until another thread deems it is safe to send them.
bool mIsPostponingSends;
std::vector> mPostponedSends;
-
- bool mBuildIDsConfirmedMatch;
};
void
diff --git a/ipc/glue/ProtocolUtils.h b/ipc/glue/ProtocolUtils.h
index 2a2e6922d464..c38b503169aa 100644
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -49,13 +49,12 @@ namespace {
// protocol 0. Oops! We can get away with this until protocol 0
// starts approaching its 65,536th message.
enum {
- BUILD_IDS_MATCH_MESSAGE_TYPE = kuint16max - 8,
- BUILD_ID_MESSAGE_TYPE = kuint16max - 7, // unused
- CHANNEL_OPENED_MESSAGE_TYPE = kuint16max - 6,
- SHMEM_DESTROYED_MESSAGE_TYPE = kuint16max - 5,
- SHMEM_CREATED_MESSAGE_TYPE = kuint16max - 4,
- GOODBYE_MESSAGE_TYPE = kuint16max - 3,
- CANCEL_MESSAGE_TYPE = kuint16max - 2,
+ BUILD_ID_MESSAGE_TYPE = kuint16max - 7,
+ CHANNEL_OPENED_MESSAGE_TYPE = kuint16max - 6,
+ SHMEM_DESTROYED_MESSAGE_TYPE = kuint16max - 5,
+ SHMEM_CREATED_MESSAGE_TYPE = kuint16max - 4,
+ GOODBYE_MESSAGE_TYPE = kuint16max - 3,
+ CANCEL_MESSAGE_TYPE = kuint16max - 2,
// kuint16max - 1 is used by ipc_channel.h.
};
diff --git a/js/xpconnect/src/xpc.msg b/js/xpconnect/src/xpc.msg
index ba2a4f79a484..7bffbf4f8260 100644
--- a/js/xpconnect/src/xpc.msg
+++ b/js/xpconnect/src/xpc.msg
@@ -220,7 +220,6 @@ XPC_MSG_DEF(NS_ERROR_GFX_PRINTER_DOC_IS_BUSY , "Cannot print this docum
/* Codes related to content */
XPC_MSG_DEF(NS_ERROR_CONTENT_CRASHED , "The process that hosted this content has crashed.")
-XPC_MSG_DEF(NS_ERROR_BUILDID_MISMATCH , "The process that hosted this content did not have the same buildID as the parent.")
/* Codes for the JS-implemented Push DOM API. These can be removed as part of bug 1252660. */
XPC_MSG_DEF(NS_ERROR_DOM_PUSH_INVALID_KEY_ERR , "Invalid raw ECDSA P-256 public key.")
diff --git a/netwerk/base/nsILoadInfo.idl b/netwerk/base/nsILoadInfo.idl
index 4ee36d90fb39..7d16edbace59 100644
--- a/netwerk/base/nsILoadInfo.idl
+++ b/netwerk/base/nsILoadInfo.idl
@@ -205,7 +205,7 @@ interface nsILoadInfo : nsISupports
/**
* Load an error page, it should be one of following : about:neterror,
- * about:certerror, about:blocked, about:tabcrashed or about:restartrequired.
+ * about:certerror, about:blocked, or about:tabcrashed.
*/
const unsigned long SEC_LOAD_ERROR_PAGE = (1<<13);
diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json
index 46ac7ba3debf..be27c26e5086 100644
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -12563,15 +12563,6 @@
"kind": "count",
"releaseChannelCollection": "opt-out",
"description": "Counts the number of times that about:tabcrashed was unloaded without submitting."
- },
- "FX_CONTENT_BUILDID_MISMATCH": {
- "record_in_processes": ["main"],
- "alert_emails": ["spohl@mozilla.com"],
- "bug_numbers": [1366808],
- "expires_in_version": "never",
- "kind": "count",
- "releaseChannelCollection": "opt-out",
- "description": "Counts the number of times that about:restartrequired appeared."
},
"D3D9_COMPOSITING_FAILURE_ID": {
"record_in_processes": ["main", "content"],
diff --git a/toolkit/components/telemetry/histogram-whitelists.json b/toolkit/components/telemetry/histogram-whitelists.json
index 925927e97fa9..dfa27118ea44 100644
--- a/toolkit/components/telemetry/histogram-whitelists.json
+++ b/toolkit/components/telemetry/histogram-whitelists.json
@@ -1636,7 +1636,6 @@
"FX_CONTENT_CRASH_DUMP_UNAVAILABLE",
"FX_CONTENT_CRASH_NOT_SUBMITTED",
"FX_CONTENT_CRASH_PRESENTED",
- "FX_CONTENT_BUILDID_MISMATCH",
"FX_SESSION_RESTORE_SEND_UPDATE_CAUSED_OOM",
"FX_TOUCH_USED",
"GEOLOCATION_ERROR",
diff --git a/xpcom/base/ErrorList.py b/xpcom/base/ErrorList.py
index e697d72e738f..81ea4dbdd781 100755
--- a/xpcom/base/ErrorList.py
+++ b/xpcom/base/ErrorList.py
@@ -868,9 +868,6 @@ with modules["CONTENT"]:
errors["NS_ERROR_XBL_BLOCKED"] = FAILURE(15)
# Error code for when the content process crashed
errors["NS_ERROR_CONTENT_CRASHED"] = FAILURE(16)
- # Error code for when the content process had a different buildID than the
- # parent
- errors["NS_ERROR_BUILDID_MISMATCH"] = FAILURE(17)
# XXX this is not really used
errors["NS_HTML_STYLE_PROPERTY_NOT_THERE"] = SUCCESS(2)