Bug 1524992 - Don't trigger crash in about:crash* when opened from external apps r=mconley
☠☠ backed out by 88ffdaa924cd ☠ ☠
authorJames Willcox <snorp@snorp.net>
Mon, 04 Mar 2019 22:06:55 +0000
changeset 520166 ae1e20a595c44100776589dcc1f76418208c88c7
parent 520165 b0b9322c7a5986af47dd41331a1ffd6c196ffc53
child 520167 face9d1e886872033b70fbdff5a40eaa244db3fb
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
@@ -142,16 +142,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