Bug 1560977 - Annotate crash reports if Fission is enabled. r=nika
authorAndrew McCreight <continuation@gmail.com>
Tue, 02 Jul 2019 21:08:55 +0000
changeset 543856 cc9b37d2e9541e9607bdf69833d3c656a859a71e
parent 543855 c55000121e562308ffacb49e016058cab3089c3c
child 543857 a248baf9930163ebeb066239174ed57b9bbb0b06
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1560977
milestone69.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 1560977 - Annotate crash reports if Fission is enabled. r=nika Differential Revision: https://phabricator.services.mozilla.com/D36530
docshell/base/nsDocShell.cpp
toolkit/crashreporter/CrashAnnotations.yaml
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -1562,17 +1562,23 @@ nsDocShell::GetUseRemoteSubframes(bool* 
   NS_ENSURE_ARG_POINTER(aUseRemoteSubframes);
 
   *aUseRemoteSubframes = mUseRemoteSubframes;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::SetRemoteSubframes(bool aUseRemoteSubframes) {
-  // Should we annotate crash reports like in aUseRemoteTabs?
+  static bool annotated = false;
+
+  if (aUseRemoteSubframes && !annotated) {
+    annotated = true;
+    CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::DOMFissionEnabled,
+                                       true);
+  }
 
   // Don't allow non-remote tabs with remote subframes.
   if (NS_WARN_IF(aUseRemoteSubframes && !mUseRemoteTabs)) {
     return NS_ERROR_UNEXPECTED;
   }
 
   mUseRemoteSubframes = aUseRemoteSubframes;
   return NS_OK;
--- a/toolkit/crashreporter/CrashAnnotations.yaml
+++ b/toolkit/crashreporter/CrashAnnotations.yaml
@@ -256,16 +256,22 @@ CycleCollector:
     Reason why the cycle collector crashed.
   type: string
 
 DeviceResetReason:
   description: >
     Reason why a DirectX device has been reset, Windows only.
   type: string
 
+DOMFissionEnabled:
+  description: >
+    Set to 1 when DOM fission is enabled, and subframes are potentially loaded
+    in a separate process.
+  type: boolean
+
 DOMIPCEnabled:
   description: >
     Set to 1 when a tab is running in a content process
   type: boolean
 
 EMCheckCompatibility:
   description: >
     Set to 1 if add-on compatibility checking is enabled.