diff --git a/CLOBBER b/CLOBBER index c591cfb0079..934512f49ee 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,4 +22,4 @@ # 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. diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index e3dbfdb5800..c8d03dd35f5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -58,7 +58,6 @@ #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" @@ -563,36 +562,6 @@ 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), @@ -607,7 +576,7 @@ nsPIDOMWindow::nsPIDOMWindow(nsPIDOMWindow *aOuterWindow) 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) {}