Bug 1276669 - Part 6: Seal the static atom table sooner. r=bz, a=ritu
authorNathan Froyd <froydnj@mozilla.com>
Thu, 26 Jan 2017 15:43:38 -0500
changeset 375823 d5ccf239c1423f30e1a9ea1491a8ee7201ef199b
parent 375822 c1b5e94191ec94a36a2c01a161933ce7ee43d7e8
child 375824 829c02ed316aebbbe061ec5c9f066e3d681f646e
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, ritu
bugs1276669
milestone53.0a2
Bug 1276669 - Part 6: Seal the static atom table sooner. r=bz, a=ritu We do this to ensure that everybody has registered all the static atoms we'll care about, and to pave the way for asserting that nobody is trying to create any static atoms past this point in the next patch.
layout/build/nsLayoutStatics.cpp
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -162,16 +162,18 @@ nsLayoutStatics::Initialize()
   nsCSSProps::AddRefTable();
   nsColorNames::AddRefTable();
   nsGkAtoms::AddRefAtoms();
   nsHtml5Atoms::AddRefAtoms();
   nsTextServicesDocument::RegisterAtoms();
   nsHTMLTags::RegisterAtoms();
   nsRDFAtoms::RegisterAtoms();
 
+  NS_SealStaticAtomTable();
+
   StartupJSEnvironment();
   rv = nsRegion::InitStatic();
   if (NS_FAILED(rv)) {
     NS_ERROR("Could not initialize nsRegion");
     return rv;
   }
 
   nsGlobalWindow::Init();
@@ -267,18 +269,16 @@ nsLayoutStatics::Initialize()
   mozilla::dom::FallbackEncoding::Initialize();
   nsLayoutUtils::Initialize();
   nsIPresShell::InitializeStatics();
   TouchManager::InitializeStatics();
   nsPrincipal::InitializeStatics();
 
   nsCORSListenerProxy::Startup();
 
-  NS_SealStaticAtomTable();
-
   nsWindowMemoryReporter::Init();
 
   SVGElementFactory::Init();
   nsSVGUtils::Init();
 
   ProcessPriorityManager::Init();
 
   nsPermissionManager::ClearOriginDataObserverInit();