Backed out 3 changesets (bug 1543166, bug 1536159, bug 1536850) for build bustage at builds/worker/workspace/build/src/dom/ipc/ContentParent.cpp a=backout
authorDaniel Varga <dvarga@mozilla.com>
Thu, 11 Apr 2019 06:22:04 +0300
changeset 526116 92601d63125e1c4f043a665476ab8cea39c9e592
parent 526115 11ddfc9bd642f08e487fb76d23b7626f0b179e58
child 526117 2e7ae693e16be47a036b193faa3133c901d4541f
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1543166, 1536159, 1536850
milestone67.0
backs out11ddfc9bd642f08e487fb76d23b7626f0b179e58
1452b03b01d45740bd3f54a15f95360fcc0597a5
6a427ed74d6533bde36358c434af42d5da67b891
Backed out 3 changesets (bug 1543166, bug 1536159, bug 1536850) for build bustage at builds/worker/workspace/build/src/dom/ipc/ContentParent.cpp a=backout Backed out changeset 11ddfc9bd642 (bug 1543166) Backed out changeset 1452b03b01d4 (bug 1536159) Backed out changeset 6a427ed74d65 (bug 1536850)
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
js/src/jit-test/tests/ion/bug1543166.js
js/src/jit/IonBuilder.cpp
js/src/vm/TypeInference.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -129,17 +129,16 @@
 #include "nsContentUtils.h"
 #include "nsDebugImpl.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsEmbedCID.h"
 #include "nsFrameLoader.h"
 #include "nsFrameMessageManager.h"
 #include "nsHashPropertyBag.h"
 #include "nsIAlertsService.h"
-#include "nsIAppStartup.h"
 #include "nsIClipboard.h"
 #include "nsICookie.h"
 #include "nsContentPermissionHelper.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsIContentProcess.h"
 #include "nsICycleCollectorListener.h"
 #include "nsIDocShellTreeOwner.h"
 #include "mozilla/dom/Document.h"
@@ -2952,16 +2951,18 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIObserver)
 NS_INTERFACE_MAP_END
 
 NS_IMETHODIMP
 ContentParent::Observe(nsISupports* aSubject, const char* aTopic,
                        const char16_t* aData) {
   if (mSubprocess && (!strcmp(aTopic, "profile-before-change") ||
                       !strcmp(aTopic, "xpcom-shutdown"))) {
+    mShuttingDown = true;
+
     // Make sure that our process will get scheduled.
     ProcessPriorityManager::SetProcessPriority(this,
                                                PROCESS_PRIORITY_FOREGROUND);
 
     // Okay to call ShutDownProcess multiple times.
     ShutDownProcess(SEND_SHUTDOWN_MESSAGE);
     MarkAsDead();
 
@@ -3371,18 +3372,17 @@ void ContentParent::ForceKillTimerCallba
   self->KillHard("ShutDownKill");
 }
 
 void ContentParent::GeneratePairedMinidump(const char* aReason) {
   // We're about to kill the child process associated with this content.
   // Something has gone wrong to get us here, so we generate a minidump
   // of the parent and child for submission to the crash server unless we're
   // already shutting down.
-  nsCOMPtr<nsIAppStartup> appStartup = components::AppStartup::Service();
-  if (mCrashReporter && !appStartup->GetShuttingDown() &&
+  if (mCrashReporter && !mShuttingDown &&
       Preferences::GetBool("dom.ipc.tabs.createKillHardCrashReports", false)) {
     // GeneratePairedMinidump creates two minidumps for us - the main
     // one is for the content process we're about to kill, and the other
     // one is for the main browser process. That second one is the extra
     // minidump tagging along, so we have to tell the crash reporter that
     // it exists and is being appended.
     nsAutoCString additionalDumps("browser");
     mCrashReporter->AddAnnotation(
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -1224,16 +1224,17 @@ class ContentParent final : public PCont
   enum class LifecycleState : uint8_t {
     LAUNCHING,
     ALIVE,
     DEAD,
   };
 
   LifecycleState mLifecycleState;
 
+  bool mShuttingDown;
   bool mIsForBrowser;
 
   // Whether this process is recording or replaying its execution, and any
   // associated recording file.
   RecordReplayState mRecordReplayState;
   nsString mRecordingFile;
 
   // When recording or replaying, the child process is a middleman. This vector
deleted file mode 100644
--- a/js/src/jit-test/tests/ion/bug1543166.js
+++ /dev/null
@@ -1,17 +0,0 @@
-function f() {
-    var arr = [];
-    for (var i = 0; i < 12; i++) {
-        // Create a new global to get "DOM" objects with different groups.
-        var g = newGlobal();
-        var o = new g.FakeDOMObject();
-        o[0] = 1;
-        arr.push(o);
-    }
-    var res;
-    for (var i = 0; i < 2000; i++) {
-        var o = arr[i % arr.length];
-        res = o[0];
-    }
-    return res;
-}
-f();
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -9245,19 +9245,16 @@ TemporaryTypeSet* IonBuilder::computeHea
 
   Vector<HeapTypeSetKey, 4, SystemAllocPolicy> properties;
   if (!properties.reserve(objTypes->getObjectCount())) {
     return nullptr;
   }
 
   for (unsigned i = 0; i < objTypes->getObjectCount(); i++) {
     TypeSet::ObjectKey* key = objTypes->getObject(i);
-    if (!key) {
-      continue;
-    }
 
     if (key->unknownProperties()) {
       return nullptr;
     }
 
     HeapTypeSetKey property = key->property(id);
     HeapTypeSet* currentSet = property.maybeTypes();
 
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -2704,24 +2704,18 @@ void TypeZone::processPendingRecompiles(
   MOZ_ASSERT(recompiles.empty());
 }
 
 void TypeZone::addPendingRecompile(JSContext* cx, const RecompileInfo& info) {
   InferSpew(ISpewOps, "addPendingRecompile: %p:%s:%u", info.script(),
             info.script()->filename(), info.script()->lineno());
 
   AutoEnterOOMUnsafeRegion oomUnsafe;
-  RecompileInfoVector& vector =
-      cx->zone()->types.activeAnalysis->pendingRecompiles;
-  if (!vector.append(info)) {
-    // BUG 1536159: For diagnostics, compute the size of the failed allocation.
-    // This presumes the vector growth strategy is to double. This is only used
-    // for crash reporting so not a problem if we get it wrong.
-    size_t allocSize = 2 * sizeof(RecompileInfo) * vector.capacity();
-    oomUnsafe.crash(allocSize, "Could not update pendingRecompiles");
+  if (!cx->zone()->types.activeAnalysis->pendingRecompiles.append(info)) {
+    oomUnsafe.crash("Could not update pendingRecompiles");
   }
 }
 
 void TypeZone::addPendingRecompile(JSContext* cx, JSScript* script) {
   MOZ_ASSERT(script);
 
   CancelOffThreadIonCompile(script);