Bug 1342823 - Part 1: Move some one-bit booleans in nsIDocument next to all the other one-bit booleans. r=farre, a=abillings
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 24 Mar 2017 19:03:29 -0400
changeset 395440 99da1ab37c37117d414561dee5051b422b18b3bf
parent 395439 d9da8b1ac1fc06b02a8b04ff4ef28290fc980374
child 395441 ae2b433951e6a1a68658bab882c66355367083dd
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfarre, abillings
bugs1342823
milestone54.0a2
Bug 1342823 - Part 1: Move some one-bit booleans in nsIDocument next to all the other one-bit booleans. r=farre, a=abillings MozReview-Commit-ID: 3FLVka93lCq
dom/base/nsDocument.cpp
dom/base/nsIDocument.h
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1333,16 +1333,18 @@ nsIDocument::nsIDocument()
     mStyleSheetChangeEventsEnabled(false),
     mIsSrcdocDocument(false),
     mDidDocumentOpen(false),
     mHasDisplayDocument(false),
     mFontFaceSetDirty(true),
     mGetUserFontSetCalled(false),
     mPostedFlushUserFontSet(false),
     mEverInForeground(false),
+    mDidFireDOMContentLoaded(true),
+    mHasScrollLinkedEffect(false),
     mCompatMode(eCompatibility_FullStandards),
     mReadyState(ReadyState::READYSTATE_UNINITIALIZED),
     mStyleBackendType(StyleBackendType::None),
 #ifdef MOZILLA_INTERNAL_API
     mVisibilityState(dom::VisibilityState::Hidden),
 #else
     mDummy(0),
 #endif
@@ -1361,18 +1363,16 @@ nsIDocument::nsIDocument()
     mEventsSuppressed(0),
     mExternalScriptsBeingEvaluated(0),
     mFrameRequestCallbackCounter(0),
     mStaticCloneCount(0),
     mWindow(nullptr),
     mBFCacheEntry(nullptr),
     mInSyncOperationCount(0),
     mBlockDOMContentLoaded(0),
-    mDidFireDOMContentLoaded(true),
-    mHasScrollLinkedEffect(false),
     mUseCounters(0),
     mChildDocumentUseCounters(0),
     mNotifiedPageForUseCounter(0),
     mUserHasInteracted(false)
 {
   SetIsInDocument();
 
   PR_INIT_CLIST(&mDOMMediaQueryLists);
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -3174,16 +3174,23 @@ protected:
   bool mGetUserFontSetCalled : 1;
 
   // Do we currently have an event posted to call FlushUserFontSet?
   bool mPostedFlushUserFontSet : 1;
 
   // True is document has ever been in a foreground window.
   bool mEverInForeground : 1;
 
+  // True if we have fired the DOMContentLoaded event, or don't plan to fire one
+  // (e.g. we're not being parsed at all).
+  bool mDidFireDOMContentLoaded : 1;
+
+  // True if ReportHasScrollLinkedEffect() has been called.
+  bool mHasScrollLinkedEffect : 1;
+
   // Compatibility mode
   nsCompatibility mCompatMode;
 
   // Our readyState
   ReadyState mReadyState;
 
   // Whether this document has (or will have, once we have a pres shell) a
   // Gecko- or Servo-backed style system.
@@ -3324,19 +3331,16 @@ protected:
 
   uint32_t mInSyncOperationCount;
 
   RefPtr<mozilla::dom::XPathEvaluator> mXPathEvaluator;
 
   nsTArray<RefPtr<mozilla::dom::AnonymousContent>> mAnonymousContents;
 
   uint32_t mBlockDOMContentLoaded;
-  bool mDidFireDOMContentLoaded:1;
-
-  bool mHasScrollLinkedEffect:1;
 
   // Our live MediaQueryLists
   PRCList mDOMMediaQueryLists;
 
   // Flags for use counters used directly by this document.
   std::bitset<mozilla::eUseCounter_Count> mUseCounters;
   // Flags for use counters used by any child documents of this document.
   std::bitset<mozilla::eUseCounter_Count> mChildDocumentUseCounters;