Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # HG changeset patch
- # User Gabriele Svelto <gsvelto@mozilla.com>
- # Date 1615296141 -3600
- # Tue Mar 09 14:22:21 2021 +0100
- # Node ID ffdd8f4ebf2f5a35216a4432b36aed5efee51fe8
- # Parent 52587fdeade51491c288fca5a43543a439d4a9c4
- __fastfail() about:crashparent
- diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp
- --- a/docshell/base/nsAboutRedirector.cpp
- +++ b/docshell/base/nsAboutRedirector.cpp
- @@ -7,16 +7,17 @@
- #include "nsAboutRedirector.h"
- #include "nsNetUtil.h"
- #include "nsAboutProtocolUtils.h"
- #include "nsBaseChannel.h"
- #include "mozilla/ArrayUtils.h"
- #include "nsIProtocolHandler.h"
- #include "nsXULAppAPI.h"
- #include "mozilla/Preferences.h"
- +#include "intrin.h"
- #define ABOUT_CONFIG_ENABLED_PREF "general.aboutConfig.enable"
- NS_IMPL_ISUPPORTS(nsAboutRedirector, nsIAboutModule)
- struct RedirEntry {
- const char* id;
- const char* url;
- @@ -28,16 +29,17 @@ class CrashChannel final : public nsBase
- explicit CrashChannel(nsIURI* aURI) { SetURI(aURI); }
- nsresult OpenContentStream(bool async, nsIInputStream** stream,
- nsIChannel** channel) override {
- nsAutoCString spec;
- mURI->GetSpec(spec);
- if (spec.EqualsASCII("about:crashparent") && XRE_IsParentProcess()) {
- + __fastfail(FAST_FAIL_INCORRECT_STACK);
- MOZ_CRASH("Crash via about:crashparent");
- }
- if (spec.EqualsASCII("about:crashcontent") && XRE_IsContentProcess()) {
- MOZ_CRASH("Crash via about:crashcontent");
- }
- NS_WARNING("Unhandled about:crash* URI or wrong process");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement