Backed out changeset 94cc3cfaa2e4 (bug 1126042) for Windows bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 28 Jan 2015 15:32:52 -0500
changeset 253519 ae4039a0ba6cd32b1d5fec08090e2bee7be5da9c
parent 253518 dcbd25d0bf522c6bf95cacea3317bb7f9eb83d99
child 253520 eb6110f55c31093b490f4ef70112f06ba172b456
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1126042
milestone38.0a1
backs out94cc3cfaa2e46ee3d89aed1396303eb5bba6c628
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
Backed out changeset 94cc3cfaa2e4 (bug 1126042) for Windows bustage. CLOSED TREE
CLOBBER
dom/base/nsGlobalWindow.cpp
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 917322 - Due to removing nsICompositionStringSynthesizer.idl
+Bug 1123384 - Needs a clobber for some reason.
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -53,17 +53,16 @@
 #include "mozilla/Likely.h"
 #include "mozilla/unused.h"
 
 // Other Classes
 #include "mozilla/dom/BarProps.h"
 #include "nsContentCID.h"
 #include "nsLayoutStatics.h"
 #include "nsCCUncollectableMarker.h"
-#include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/workers/Workers.h"
 #include "mozilla/dom/MessagePortList.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "nsJSPrincipals.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Debug.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/EventStates.h"
@@ -558,61 +557,31 @@ NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(n
 // Return true if this timeout has a refcount of 1. This is used to check
 // that dummy_timeout doesn't leak from nsGlobalWindow::RunTimeout.
 bool
 nsTimeout::HasRefCntOne()
 {
   return mRefCnt.get() == 1;
 }
 
-// We use only 53 bits for the window ID so that it can be converted to and from
-// a JS value without loss of precision. The upper bits of the window ID hold the
-// process ID. The lower bits identify the window.
-static const uint64_t kWindowIDTotalBits = 53;
-static const uint64_t kWindowIDProcessBits = 22;
-static const uint64_t kWindowIDWindowBits = kWindowIDTotalBits - kWindowIDProcessBits;
-
-// Try to return a window ID that is unique across processes and that will never
-// be recycled.
-static uint64_t
-NextWindowID()
-{
-  uint64_t processID = 0;
-  if (XRE_GetProcessType() == GeckoProcessType_Content) {
-    ContentChild* cc = ContentChild::GetSingleton();
-    processID = cc->GetID();
-  }
-
-  MOZ_RELEASE_ASSERT(processID < (uint64_t(1) << kWindowIDProcessBits));
-  uint64_t processBits = processID & ((uint64_t(1) << kWindowIDProcessBits) - 1);
-
-  // Make sure no actual window ends up with mWindowID == 0.
-  uint64_t windowID = ++gNextWindowID;
-
-  MOZ_RELEASE_ASSERT(windowID < (uint64_t(1) << kWindowIDWindowBits));
-  uint64_t windowBits = windowID & ((uint64_t(1) << kWindowIDWindowBits) - 1);
-
-  return (processBits << kWindowIDWindowBits) | windowBits;
-}
-
 nsPIDOMWindow::nsPIDOMWindow(nsPIDOMWindow *aOuterWindow)
 : mFrameElement(nullptr), mDocShell(nullptr), mModalStateDepth(0),
   mRunningTimeout(nullptr), mMutationBits(0), mIsDocumentLoaded(false),
   mIsHandlingResizeEvent(false), mIsInnerWindow(aOuterWindow != nullptr),
   mMayHavePaintEventListener(false), mMayHaveTouchEventListener(false),
   mMayHaveTouchCaret(false),
   mMayHaveScrollWheelEventListener(false),
   mMayHaveMouseEnterLeaveEventListener(false),
   mMayHavePointerEnterLeaveEventListener(false),
   mIsModalContentWindow(false),
   mIsActive(false), mIsBackground(false),
   mAudioMuted(false), mAudioVolume(1.0),
   mInnerWindow(nullptr), mOuterWindow(aOuterWindow),
   // Make sure no actual window ends up with mWindowID == 0
-  mWindowID(NextWindowID()), mHasNotifiedGlobalCreated(false),
+  mWindowID(++gNextWindowID), mHasNotifiedGlobalCreated(false),
   mMarkedCCGeneration(0), mSendAfterRemotePaint(false)
  {}
 
 nsPIDOMWindow::~nsPIDOMWindow() {}
 
 // DialogValueHolder CC goop.
 NS_IMPL_CYCLE_COLLECTION(DialogValueHolder, mValue)