Bug 1524992 - Don't trigger crash in about:crash* when opened from external apps r=mconley
☠☠ backed out by 5943b02bfa38 ☠ ☠
authorJames Willcox <snorp@snorp.net>
Wed, 27 Feb 2019 16:04:04 +0000
changeset 519343 fb1d7e57e253c6922a51d436dc0796e8411b24eb
parent 519342 bd215cd3c8d71e1c66fb01d6a08ac6773f9e51e1
child 519344 280ab3f61c87b43e18be462606866a3a669e8b5a
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1524992
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1524992 - Don't trigger crash in about:crash* when opened from external apps r=mconley Differential Revision: https://phabricator.services.mozilla.com/D20891
docshell/base/nsAboutRedirector.cpp
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -144,16 +144,22 @@ nsAboutRedirector::NewChannel(nsIURI* aU
   nsAutoCString path;
   nsresult rv = NS_GetAboutModuleName(aURI, path);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIIOService> ioService = do_GetIOService(&rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (path.EqualsASCII("crashparent") || path.EqualsASCII("crashcontent")) {
+    bool isExternal;
+    aLoadInfo->GetLoadTriggeredFromExternal(&isExternal);
+    if (isExternal) {
+      return NS_ERROR_NOT_AVAILABLE;
+    }
+
     nsCOMPtr<nsIChannel> channel = new CrashChannel(aURI);
     channel->SetLoadInfo(aLoadInfo);
     channel.forget(aResult);
     return NS_OK;
   }
 
 #ifdef ABOUT_CONFIG_BLOCKED_GV
   // We don't want to allow access to about:config from