Bug 1276669 - Part 8: Add a comment in NS_InitXPCOM2 to make static atom initialization less cryptic. r=erahm, a=ritu
authorNathan Froyd <froydnj@mozilla.com>
Thu, 26 Jan 2017 15:43:38 -0500
changeset 378109 712c0d0da7dce945cab161b7dcfa6e6ceec87ea3
parent 378108 829c02ed316aebbbe061ec5c9f066e3d681f646e
child 378110 2159ed149364daaadd4da371c00c4809cd5c3490
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm, ritu
bugs1276669
milestone53.0a2
Bug 1276669 - Part 8: Add a comment in NS_InitXPCOM2 to make static atom initialization less cryptic. r=erahm, a=ritu This comment makes things slightly more greppable.
xpcom/build/XPCOMInit.cpp
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -730,17 +730,19 @@ NS_InitXPCOM2(nsIServiceManager** aResul
   // add any services listed in the "xpcom-directory-providers" category
   // to the directory service.
   nsDirectoryService::gService->RegisterCategoryProviders();
 
   // Init SharedThreadPool (which needs the service manager).
   SharedThreadPool::InitStatics();
 
   // Force layout to spin up so that nsContentUtils is available for cx stack
-  // munging.
+  // munging.  Note that layout registers a number of static atoms, and also
+  // seals the static atom table, so NS_RegisterStaticAtom may not be called
+  // beyond this point.
   nsCOMPtr<nsISupports> componentLoader =
     do_GetService("@mozilla.org/moz/jsloader;1");
 
   mozilla::scache::StartupCache::GetSingleton();
   mozilla::AvailableMemoryTracker::Activate();
 
   // Notify observers of xpcom autoregistration start
   NS_CreateServicesFromCategory(NS_XPCOM_STARTUP_CATEGORY,