Rename the "eden" bit to something more descriptive
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2012 09:58:45 +0000 (09:58 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Nov 2012 09:58:45 +0000 (09:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=102985

Reviewed by Adam Barth.

InEdenFlag is not descriptive. Per the discussion in IRC,
we rename InEdenFlag to V8CollectableDuringMinorGCFlag.

No tests. No change in behavior.

* bindings/v8/V8GCController.cpp:
(WebCore::gcTree):
(WebCore::V8GCController::didCreateWrapperForNode):
(WebCore::V8GCController::minorGCPrologue):
* dom/Node.h:
(WebCore::Node::isV8CollectableDuringMinorGC):
(WebCore::Node::setV8CollectableDuringMinorGC):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135498 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/V8GCController.cpp
Source/WebCore/dom/Node.h

index 7ed1735..777d070 100644 (file)
@@ -1,5 +1,25 @@
 2012-11-22  Kentaro Hara  <haraken@chromium.org>
 
+        Rename the "eden" bit to something more descriptive
+        https://bugs.webkit.org/show_bug.cgi?id=102985
+
+        Reviewed by Adam Barth.
+
+        InEdenFlag is not descriptive. Per the discussion in IRC,
+        we rename InEdenFlag to V8CollectableDuringMinorGCFlag.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/V8GCController.cpp:
+        (WebCore::gcTree):
+        (WebCore::V8GCController::didCreateWrapperForNode):
+        (WebCore::V8GCController::minorGCPrologue):
+        * dom/Node.h:
+        (WebCore::Node::isV8CollectableDuringMinorGC):
+        (WebCore::Node::setV8CollectableDuringMinorGC):
+
+2012-11-22  Kentaro Hara  <haraken@chromium.org>
+
         [V8] Move AddMessageListener() from WorkerContextExecutionProxy::initializeIfNeeded() to WorkerContextExecutionProxy::initIsolate()
         https://bugs.webkit.org/show_bug.cgi?id=102998
 
index 4cc03fb..99ce359 100644 (file)
@@ -236,7 +236,7 @@ static void gcTree(Node* startNode)
     do {
         ASSERT(node);
         if (!node->wrapper().IsEmpty()) {
-            if (!node->inEden()) {
+            if (!node->isV8CollectableDuringMinorGC()) {
                 // The fact that we encounter a node that is not in the Eden space
                 // implies that its wrapper might be in the old space of V8.
                 // This indicates that the minor GC cannot anyway judge reachability
@@ -244,7 +244,7 @@ static void gcTree(Node* startNode)
                 return;
             }
             // A once traversed node is removed from the Eden space.
-            node->setEden(false);
+            node->setV8CollectableDuringMinorGC(false);
             newSpaceWrappers.append(node->wrapper());
         }
         if (node->firstChild()) {
@@ -285,7 +285,7 @@ void V8GCController::didCreateWrapperForNode(Node* node)
     if (m_edenNodes->size() <= wrappersHandledByEachMinorGC) {
         // A node of a newly created wrapper is put into the Eden space.
         m_edenNodes->append(node);
-        node->setEden(true);
+        node->setV8CollectableDuringMinorGC(true);
     }
 }
 
@@ -307,7 +307,7 @@ void V8GCController::minorGCPrologue()
     if (isMainThreadOrGCThread() && m_edenNodes) {
         for (size_t i = 0; i < m_edenNodes->size(); i++) {
             ASSERT(!m_edenNodes->at(i)->wrapper().IsEmpty());
-            if (m_edenNodes->at(i)->inEden()) // This branch is just for performance.
+            if (m_edenNodes->at(i)->isV8CollectableDuringMinorGC()) // This branch is just for performance.
                 gcTree(m_edenNodes->at(i));
         }
     }
index 2d9cacd..232e70e 100644 (file)
@@ -356,8 +356,8 @@ public:
     bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); }
     void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag); }
 
-    bool inEden() const { return getFlag(InEdenFlag); }
-    void setEden(bool flag) { setFlag(flag, InEdenFlag); }
+    bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuringMinorGCFlag); }
+    void setV8CollectableDuringMinorGC(bool flag) { setFlag(flag, V8CollectableDuringMinorGCFlag); }
 
     enum ShouldSetAttached {
         SetAttached,
@@ -724,7 +724,7 @@ private:
         HasCustomCallbacksFlag = 1 << 25,
         HasScopedHTMLStyleChildFlag = 1 << 26,
         HasEventTargetDataFlag = 1 << 27,
-        InEdenFlag = 1 << 28,
+        V8CollectableDuringMinorGCFlag = 1 << 28,
         IsInsertionPointFlag = 1 << 29,
 
 #if ENABLE(SVG)