Bug 948774: Followup to tweak an assertion. r=me
authorKyle Huey <khuey@kylehuey.com>
Tue, 14 Jan 2014 21:17:34 -0800
changeset 163489 d1d1f50c63f9ffd717aabe19d2c5fa77d7dbb761
parent 163488 1eeb754bda29fbf3afa8c3b56520ef6de49aeb4e
child 163490 d8036ae67c2010704b8f0913fb3e8d18fa88db50
push idunknown
push userunknown
push dateunknown
reviewersme
bugs948774
milestone29.0a1
Bug 948774: Followup to tweak an assertion. r=me
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1237,20 +1237,22 @@ ContentParent::ContentParent(mozIApplica
                              ProcessPriority aInitialPriority /* = PROCESS_PRIORITY_FOREGROUND */,
                              bool aIsNuwaProcess /* = false */)
     : mOSPrivileges(aOSPrivileges)
     , mIsForBrowser(aIsForBrowser)
     , mIsNuwaProcess(aIsNuwaProcess)
 {
     InitializeMembers();  // Perform common initialization.
 
-    // No more than one of !!aApp, aIsForBrowser, aIsForPreallocated, and
-    // aIsNuwaProcess should be true.
-    MOZ_ASSERT(!!aApp + aIsForBrowser + aIsForPreallocated + aIsNuwaProcess <=
-               1);
+    // No more than one of !!aApp, aIsForBrowser, aIsForPreallocated should be
+    // true.
+    MOZ_ASSERT(!!aApp + aIsForBrowser + aIsForPreallocated <= 1);
+
+    // Only the preallocated process uses Nuwa.
+    MOZ_ASSERT_IF(aIsNuwaProcess, aIsForPreallocated);
 
     // Insert ourselves into the global linked list of ContentParent objects.
     if (!sContentParents) {
         sContentParents = new LinkedList<ContentParent>();
     }
     if (!aIsNuwaProcess) {
         sContentParents->insertBack(this);
     }