Bug 1524992 - Don't trigger crash in about:crash* when opened from external apps r=mconley
☠☠ backed out by 2785f1f139e8 ☠ ☠
authorJames Willcox <snorp@snorp.net>
Mon, 25 Feb 2019 21:37:45 +0000
changeset 519332 998c1f756e51d9c8c983cf0585971aef40162f63
parent 519331 e5da75d979ef6cd6807c7ecb2aa89c8c4bf2781c
child 519333 e1b06db7e2c61a57616a14fb4e0bbf4cb62149ac
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 Depends on D20890 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