Bug 95021 - Removed the NULL checks from visitChildren functions
Summary: Removed the NULL checks from visitChildren functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on: 95060
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-25 21:51 PDT by Geoffrey Garen
Modified: 2012-08-27 02:13 PDT (History)
6 users (show)

See Also:


Attachments
Patch (22.53 KB, patch)
2012-08-25 21:55 PDT, Geoffrey Garen
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2012-08-25 21:51:01 PDT
Removed the NULL checks from visitChildren functions
Comment 1 Geoffrey Garen 2012-08-25 21:55:52 PDT
Created attachment 160587 [details]
Patch
Comment 2 Geoffrey Garen 2012-08-26 20:56:31 PDT
Committed r126721: <http://trac.webkit.org/changeset/126721>
Comment 3 Chris Dumez 2012-08-27 02:09:46 PDT
After this patch, bindings-generation-tests started failing:
FAIL: (JS) JSTestObj.cpp
--- WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2012-08-24 02:14:04.835189616 -0700
+++ /tmp/tmpRz6I1v/JSTestObj.cpp	2012-08-27 01:33:11.159781908 -0700
@@ -2593,10 +2593,8 @@
     COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
     ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(thisObject, visitor);
-    if (thisObject->m_cachedAttribute1)
-        visitor.append(&thisObject->m_cachedAttribute1);
-    if (thisObject->m_cachedAttribute2)
-        visitor.append(&thisObject->m_cachedAttribute2);
+    visitor.append(&thisObject->m_cachedAttribute1);
+    visitor.append(&thisObject->m_cachedAttribute2);
 }

FAIL: (JS) JSTestSerializedScriptValueInterface.cpp
--- WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp	2012-07-27 10:21:26.271861874 -0700
+++ /tmp/tmpwwIxP6/JSTestSerializedScriptValueInterface.cpp	2012-08-27 01:33:11.579798199 -0700
@@ -356,10 +356,8 @@
     COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
     ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
     Base::visitChildren(thisObject, visitor);
-    if (thisObject->m_cachedValue)
-        visitor.append(&thisObject->m_cachedValue);
-    if (thisObject->m_cachedReadonlyValue)
-        visitor.append(&thisObject->m_cachedReadonlyValue);
+    visitor.append(&thisObject->m_cachedValue);
+    visitor.append(&thisObject->m_cachedReadonlyValue);
 }

Probably, the expected results need to be regenerated.