De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
https://bugs.webkit.org/show_bug.cgi?id=68839

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Removed the remaining visitChildrenVirtual methods.  This patch completes the process of
de-virtualizing visitChildren.

* API/JSCallbackObject.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
* debugger/DebuggerActivation.h:
* runtime/Arguments.cpp:
* runtime/Arguments.h:
* runtime/Executable.cpp:
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
* runtime/GetterSetter.h:
* runtime/JSActivation.cpp:
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
* runtime/JSArray.h:
* runtime/JSFunction.cpp:
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSObject.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
* runtime/JSStaticScopeObject.h:
* runtime/JSValue.h:
* runtime/NativeErrorConstructor.cpp:
* runtime/NativeErrorConstructor.h:
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* runtime/Structure.cpp:
* runtime/Structure.h:
* runtime/StructureChain.cpp:
* runtime/StructureChain.h:

Inlined the method table access and call to the visitChildren function (the only call sites
to visitChildren are here).
* heap/MarkStack.cpp:
(JSC::SlotVisitor::visitChildren):

Changed the field name for the visitChildren function pointer to visitChildren (from
visitChildrenFunctionPtr) to make call sites less verbose.
* runtime/ClassInfo.h:

Discovered JSBoundFunction doesn't have its own ClassInfo (it used JSFunction's ClassInfo) but
overrides visitChildren, so it needs to have its own ClassInfo.
* runtime/JSBoundFunction.cpp:
* runtime/JSBoundFunction.h:

Had to move className up to make sure that the virtual destructor in JSObject wasn't
the first non-inline virtual method in JSObject (as per the comment in the file).
Also moved JSCell::visitChildrenVirtual into JSObject.h in order for it be inline-able
to mitigate the cost of an extra method call.

Also added a convenience accessor function methodTable() to JSCell to return the MethodTable to make
call sites more concise.  Implementation is inline in JSObject.h.
* runtime/JSObject.h:
(JSC::JSCell::methodTable):
* runtime/JSCell.h:

Added an out of line virtual destructor to JSWrapperObject and ScopeChainNode to
appease the vtable gods.  It refused to compile if there were no virtual methods in
both of these classes due to the presence of a weak vtable pointer.
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::~JSWrapperObject):
* runtime/JSWrapperObject.h:
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::~ScopeChainNode):
* runtime/ScopeChain.h:

Source/JavaScriptGlue:

Removed the remaining visitChildrenVirtual methods.  This patch completes the process of
de-virtualizing visitChildren.

* UserObjectImp.cpp:
* UserObjectImp.h:

Source/WebCore:

No new tests.

Removed the remaining visitChildrenVirtual methods.  This patch completes the process of
de-virtualizing visitChildren.

* WebCore.exp.in:
* bindings/js/JSAttrCustom.cpp:
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSCSSRuleCustom.cpp:
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/js/JSCanvasRenderingContextCustom.cpp:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
(WebCore::JSDOMGlobalObject::finishCreation):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
* bindings/js/JSMessageChannelCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSNamedNodeMapCustom.cpp:
* bindings/js/JSNodeCustom.cpp:
* bindings/js/JSNodeFilterCustom.cpp:
* bindings/js/JSNodeIteratorCustom.cpp:
* bindings/js/JSSVGElementInstanceCustom.cpp:
* bindings/js/JSSharedWorkerCustom.cpp:
* bindings/js/JSStyleSheetCustom.cpp:
* bindings/js/JSTreeWalkerCustom.cpp:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSWorkerContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
* bindings/js/JSXPathResultCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bridge/qt/qt_instance.cpp:
* bridge/qt/qt_runtime.cpp:
* bridge/qt/qt_runtime.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96346 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h
index 7cd483c..feb7d97 100644
--- a/Source/JavaScriptCore/API/JSCallbackObject.h
+++ b/Source/JavaScriptCore/API/JSCallbackObject.h
@@ -197,11 +197,6 @@
     virtual CallType getCallDataVirtual(CallData&);
     static CallType getCallData(JSCell*, CallData&);
 
-    virtual void visitChildrenVirtual(SlotVisitor& visitor)
-    {
-        visitChildren(this, visitor);
-    }
-
     static void visitChildren(JSCell* cell, SlotVisitor& visitor)
     {
         JSCallbackObject* thisObject = static_cast<JSCallbackObject*>(cell);
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 3867e72..384ae0f 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,82 @@
+2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
+        https://bugs.webkit.org/show_bug.cgi?id=68839
+
+        Reviewed by Geoffrey Garen.
+
+        Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
+        de-virtualizing visitChildren.
+
+        * API/JSCallbackObject.h:
+        * JavaScriptCore.exp:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+        * debugger/DebuggerActivation.cpp:
+        * debugger/DebuggerActivation.h:
+        * runtime/Arguments.cpp:
+        * runtime/Arguments.h:
+        * runtime/Executable.cpp:
+        * runtime/Executable.h:
+        * runtime/GetterSetter.cpp:
+        * runtime/GetterSetter.h:
+        * runtime/JSActivation.cpp:
+        * runtime/JSActivation.h:
+        * runtime/JSArray.cpp:
+        * runtime/JSArray.h:
+        * runtime/JSFunction.cpp:
+        * runtime/JSFunction.h:
+        * runtime/JSGlobalObject.cpp:
+        * runtime/JSGlobalObject.h:
+        * runtime/JSObject.cpp:
+        * runtime/JSPropertyNameIterator.cpp:
+        * runtime/JSPropertyNameIterator.h:
+        * runtime/JSStaticScopeObject.cpp:
+        * runtime/JSStaticScopeObject.h:
+        * runtime/JSValue.h:
+        * runtime/NativeErrorConstructor.cpp:
+        * runtime/NativeErrorConstructor.h:
+        * runtime/RegExpObject.cpp:
+        * runtime/RegExpObject.h:
+        * runtime/Structure.cpp:
+        * runtime/Structure.h:
+        * runtime/StructureChain.cpp:
+        * runtime/StructureChain.h:
+
+        Inlined the method table access and call to the visitChildren function (the only call sites 
+        to visitChildren are here).
+        * heap/MarkStack.cpp:
+        (JSC::SlotVisitor::visitChildren):
+
+        Changed the field name for the visitChildren function pointer to visitChildren (from 
+        visitChildrenFunctionPtr) to make call sites less verbose.
+        * runtime/ClassInfo.h:
+
+        Discovered JSBoundFunction doesn't have its own ClassInfo (it used JSFunction's ClassInfo) but 
+        overrides visitChildren, so it needs to have its own ClassInfo.
+        * runtime/JSBoundFunction.cpp:
+        * runtime/JSBoundFunction.h:
+
+        Had to move className up to make sure that the virtual destructor in JSObject wasn't 
+        the first non-inline virtual method in JSObject (as per the comment in the file).
+        Also moved JSCell::visitChildrenVirtual into JSObject.h in order for it be inline-able
+        to mitigate the cost of an extra method call.
+
+        Also added a convenience accessor function methodTable() to JSCell to return the MethodTable to make 
+        call sites more concise.  Implementation is inline in JSObject.h.
+        * runtime/JSObject.h:
+        (JSC::JSCell::methodTable):
+        * runtime/JSCell.h:
+
+        Added an out of line virtual destructor to JSWrapperObject and ScopeChainNode to 
+        appease the vtable gods.  It refused to compile if there were no virtual methods in 
+        both of these classes due to the presence of a weak vtable pointer.
+        * runtime/JSWrapperObject.cpp:
+        (JSC::JSWrapperObject::~JSWrapperObject):
+        * runtime/JSWrapperObject.h:
+        * runtime/ScopeChain.cpp:
+        (JSC::ScopeChainNode::~ScopeChainNode):
+        * runtime/ScopeChain.h:
+
 2011-09-29  Yuqiang Xian  <yuqiang.xian@intel.com>
 
         Bug fixes for CreateThis, NewObject and GetByOffset in JSVALUE32_64 DFG JIT
diff --git a/Source/JavaScriptCore/JavaScriptCore.exp b/Source/JavaScriptCore/JavaScriptCore.exp
index ec291c5..f822988 100644
--- a/Source/JavaScriptCore/JavaScriptCore.exp
+++ b/Source/JavaScriptCore/JavaScriptCore.exp
@@ -166,7 +166,6 @@
 __ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi
 __ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
 __ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
-__ZN3JSC14JSGlobalObject20visitChildrenVirtualERNS_11SlotVisitorE
 __ZN3JSC14JSGlobalObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
 __ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE  
 __ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE
@@ -277,7 +276,6 @@
 __ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
 __ZN3JSC7JSArray15setSubclassDataEPv
 __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
-__ZN3JSC7JSArray20visitChildrenVirtualERNS_11SlotVisitorE
 __ZN3JSC7JSArray6s_infoE
 __ZN3JSC7JSArray9setLengthEj
 __ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
@@ -321,7 +319,6 @@
 __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_7JSValueEj
 __ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
 __ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
-__ZN3JSC8JSObject20visitChildrenVirtualERNS_11SlotVisitorE
 __ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
 __ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierBaseINS_7UnknownEEE
 __ZN3JSC8JSObject23allocatePropertyStorageERNS_12JSGlobalDataEmm
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
index a3355c3..867259b 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
@@ -33,6 +33,7 @@
     ??1JSGlobalObject@JSC@@UAE@XZ
     ??1Mutex@WTF@@QAE@XZ
     ??1RefCountedLeakCounter@WTF@@QAE@XZ
+    ??1ScopeChainNode@JSC@@EAE@XZ
     ??1SourceProviderCache@JSC@@QAE@XZ
     ??1ThreadCondition@WTF@@QAE@XZ
     ??1WTFThreadData@WTF@@QAE@XZ
@@ -372,9 +373,6 @@
     ?vtableAnchor@InternalFunction@JSC@@EAEXXZ
     ?visitChildren@JSGlobalObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z
     ?visitChildren@JSObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z
-    ?visitChildrenVirtual@JSGlobalObject@JSC@@UAEXAAVSlotVisitor@2@@Z
-    ?visitChildrenVirtual@JSObject@JSC@@UAEXAAVSlotVisitor@2@@Z
-    ?visitChildrenVirtual@ScopeChainNode@JSC@@UAEXAAVSlotVisitor@2@@Z
     ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z
     ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z
     ?writable@PropertyDescriptor@JSC@@QBE_NXZ
diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
index ef97b0f..d7b866d 100644
--- a/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
+++ b/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
@@ -43,11 +43,6 @@
     m_activation.set(globalData, this, static_cast<JSActivation*>(activation));
 }
 
-void DebuggerActivation::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void DebuggerActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     DebuggerActivation* thisObject = static_cast<DebuggerActivation*>(cell);
diff --git a/Source/JavaScriptCore/debugger/DebuggerActivation.h b/Source/JavaScriptCore/debugger/DebuggerActivation.h
index b0c20c2..97110b2 100644
--- a/Source/JavaScriptCore/debugger/DebuggerActivation.h
+++ b/Source/JavaScriptCore/debugger/DebuggerActivation.h
@@ -41,7 +41,6 @@
             return activation;
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         virtual UString className() const;
         virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
diff --git a/Source/JavaScriptCore/heap/MarkStack.cpp b/Source/JavaScriptCore/heap/MarkStack.cpp
index c39c57f..e539c41 100644
--- a/Source/JavaScriptCore/heap/MarkStack.cpp
+++ b/Source/JavaScriptCore/heap/MarkStack.cpp
@@ -70,7 +70,7 @@
 #else
         ASSERT(!m_isCheckingForDefaultMarkViolation);
         m_isCheckingForDefaultMarkViolation = true;
-        cell->visitChildrenVirtual(*this);
+        cell->methodTable()->visitChildren(cell, *this);
         ASSERT(m_isCheckingForDefaultMarkViolation);
         m_isCheckingForDefaultMarkViolation = false;
 #endif
@@ -80,7 +80,7 @@
         asArray(cell)->visitChildrenDirect(*this);
         return;
     }
-    cell->visitChildrenVirtual(*this);
+    cell->methodTable()->visitChildren(cell, *this);
 }
 
 void SlotVisitor::drain()
diff --git a/Source/JavaScriptCore/runtime/Arguments.cpp b/Source/JavaScriptCore/runtime/Arguments.cpp
index 62f485d..f53b9bd 100644
--- a/Source/JavaScriptCore/runtime/Arguments.cpp
+++ b/Source/JavaScriptCore/runtime/Arguments.cpp
@@ -43,11 +43,6 @@
         delete [] d->extraArguments;
 }
 
-void Arguments::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void Arguments::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     Arguments* thisObject = static_cast<Arguments*>(cell);
diff --git a/Source/JavaScriptCore/runtime/Arguments.h b/Source/JavaScriptCore/runtime/Arguments.h
index 5e23074..fe990b4 100644
--- a/Source/JavaScriptCore/runtime/Arguments.h
+++ b/Source/JavaScriptCore/runtime/Arguments.h
@@ -90,7 +90,6 @@
 
         static const ClassInfo s_info;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         void fillArgList(ExecState*, MarkedArgumentBuffer&);
diff --git a/Source/JavaScriptCore/runtime/ClassInfo.h b/Source/JavaScriptCore/runtime/ClassInfo.h
index 007aa5c..913ebb7 100644
--- a/Source/JavaScriptCore/runtime/ClassInfo.h
+++ b/Source/JavaScriptCore/runtime/ClassInfo.h
@@ -32,7 +32,7 @@
 
     struct MethodTable {
         typedef void (*VisitChildrenFunctionPtr)(JSCell*, SlotVisitor&);
-        VisitChildrenFunctionPtr visitChildrenFunctionPtr;
+        VisitChildrenFunctionPtr visitChildren;
     };
 
 #define CREATE_METHOD_TABLE(ClassName) { \
diff --git a/Source/JavaScriptCore/runtime/Executable.cpp b/Source/JavaScriptCore/runtime/Executable.cpp
index 781b934..3bbae1b 100644
--- a/Source/JavaScriptCore/runtime/Executable.cpp
+++ b/Source/JavaScriptCore/runtime/Executable.cpp
@@ -234,11 +234,6 @@
 }
 #endif
 
-void EvalExecutable::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void EvalExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     EvalExecutable* thisObject = static_cast<EvalExecutable*>(cell);
@@ -378,11 +373,6 @@
 #endif
 }
 
-void ProgramExecutable::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void ProgramExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     ProgramExecutable* thisObject = static_cast<ProgramExecutable*>(cell);
@@ -596,11 +586,6 @@
 }
 #endif
 
-void FunctionExecutable::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void FunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     FunctionExecutable* thisObject = static_cast<FunctionExecutable*>(cell);
diff --git a/Source/JavaScriptCore/runtime/Executable.h b/Source/JavaScriptCore/runtime/Executable.h
index 15308bf..2457729 100644
--- a/Source/JavaScriptCore/runtime/Executable.h
+++ b/Source/JavaScriptCore/runtime/Executable.h
@@ -356,7 +356,6 @@
         EvalExecutable(ExecState*, const SourceCode&, bool);
 
         JSObject* compileInternal(ExecState*, ScopeChainNode*, JITCode::JITType);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         void unlinkCalls();
 
@@ -422,7 +421,6 @@
         ProgramExecutable(ExecState*, const SourceCode&);
 
         JSObject* compileInternal(ExecState*, ScopeChainNode*, JITCode::JITType);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         void unlinkCalls();
 
@@ -582,7 +580,6 @@
         SharedSymbolTable* symbolTable() const { return m_symbolTable; }
 
         void discardCode();
-        void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         static FunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto)
diff --git a/Source/JavaScriptCore/runtime/GetterSetter.cpp b/Source/JavaScriptCore/runtime/GetterSetter.cpp
index d0a578a..bef987f 100644
--- a/Source/JavaScriptCore/runtime/GetterSetter.cpp
+++ b/Source/JavaScriptCore/runtime/GetterSetter.cpp
@@ -30,11 +30,6 @@
 
 const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(GetterSetter) };
 
-void GetterSetter::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void GetterSetter::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     GetterSetter* thisObject = static_cast<GetterSetter*>(cell);
diff --git a/Source/JavaScriptCore/runtime/GetterSetter.h b/Source/JavaScriptCore/runtime/GetterSetter.h
index a312f73..d5aab81 100644
--- a/Source/JavaScriptCore/runtime/GetterSetter.h
+++ b/Source/JavaScriptCore/runtime/GetterSetter.h
@@ -53,7 +53,6 @@
             return getterSetter;
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         JSObject* getter() const { return m_getter.get(); }
diff --git a/Source/JavaScriptCore/runtime/JSActivation.cpp b/Source/JavaScriptCore/runtime/JSActivation.cpp
index 959bcf8..442b77f 100644
--- a/Source/JavaScriptCore/runtime/JSActivation.cpp
+++ b/Source/JavaScriptCore/runtime/JSActivation.cpp
@@ -63,11 +63,6 @@
     static_cast<SharedSymbolTable*>(m_symbolTable)->deref();
 }
 
-void JSActivation::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSActivation* thisObject = static_cast<JSActivation*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSActivation.h b/Source/JavaScriptCore/runtime/JSActivation.h
index 9910976..e6e774f 100644
--- a/Source/JavaScriptCore/runtime/JSActivation.h
+++ b/Source/JavaScriptCore/runtime/JSActivation.h
@@ -55,7 +55,6 @@
 
         virtual ~JSActivation();
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         virtual bool isDynamicScope(bool& requiresDynamicChecks) const;
diff --git a/Source/JavaScriptCore/runtime/JSArray.cpp b/Source/JavaScriptCore/runtime/JSArray.cpp
index 1d0a156..020ccf0 100644
--- a/Source/JavaScriptCore/runtime/JSArray.cpp
+++ b/Source/JavaScriptCore/runtime/JSArray.cpp
@@ -871,11 +871,6 @@
         vector[i].clear();
 }
 
-void JSArray::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSArray::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSArray* thisObject = static_cast<JSArray*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSArray.h b/Source/JavaScriptCore/runtime/JSArray.h
index e8fe789..e5532ab 100644
--- a/Source/JavaScriptCore/runtime/JSArray.h
+++ b/Source/JavaScriptCore/runtime/JSArray.h
@@ -172,7 +172,6 @@
         virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
         virtual bool deleteProperty(ExecState*, unsigned propertyName);
         virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         void* subclassData() const;
diff --git a/Source/JavaScriptCore/runtime/JSBoundFunction.cpp b/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
index bbc9bd9..fd31bcd 100644
--- a/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
+++ b/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
@@ -32,6 +32,8 @@
 
 ASSERT_CLASS_FITS_IN_CELL(JSBoundFunction);
 
+const ClassInfo JSBoundFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSBoundFunction) };
+
 EncodedJSValue JSC_HOST_CALL boundFunctionCall(ExecState* exec)
 {
     JSBoundFunction* boundFunction = static_cast<JSBoundFunction*>(exec->callee());
@@ -140,11 +142,6 @@
     ASSERT(inherits(&s_info));
 }
 
-void JSBoundFunction::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSBoundFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSBoundFunction* thisObject = static_cast<JSBoundFunction*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSBoundFunction.h b/Source/JavaScriptCore/runtime/JSBoundFunction.h
index 5250e90..ebbc46c 100644
--- a/Source/JavaScriptCore/runtime/JSBoundFunction.h
+++ b/Source/JavaScriptCore/runtime/JSBoundFunction.h
@@ -54,10 +54,11 @@
         return Structure::create(globalData, globalObject, prototype, TypeInfo(JSFunctionType, StructureFlags), &s_info); 
     }
 
-protected:
-    const static unsigned StructureFlags = OverridesHasInstance | Base::StructureFlags;
+    static JS_EXPORTDATA const ClassInfo s_info;
 
-    virtual void visitChildrenVirtual(SlotVisitor&);
+protected:
+    const static unsigned StructureFlags = OverridesHasInstance | OverridesVisitChildren | Base::StructureFlags;
+
     static void visitChildren(JSCell*, SlotVisitor&);
 
 private:
diff --git a/Source/JavaScriptCore/runtime/JSCell.h b/Source/JavaScriptCore/runtime/JSCell.h
index 29288d8..8bf75ac 100644
--- a/Source/JavaScriptCore/runtime/JSCell.h
+++ b/Source/JavaScriptCore/runtime/JSCell.h
@@ -85,11 +85,11 @@
         virtual UString toString(ExecState*) const;
         virtual JSObject* toObject(ExecState*, JSGlobalObject*) const;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         // Object operations, with the toObject operation included.
         const ClassInfo* classInfo() const;
+        const MethodTable* methodTable() const;
         virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
         virtual void put(ExecState*, unsigned propertyName, JSValue);
         virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
@@ -181,11 +181,6 @@
         return m_structure.get();
     }
 
-    inline void JSCell::visitChildrenVirtual(SlotVisitor& visitor)
-    {
-        visitChildren(this, visitor);
-    }
-
     inline void JSCell::visitChildren(JSCell* cell, SlotVisitor& visitor)
     {
         JSCell* thisObject = static_cast<JSCell*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSFunction.cpp b/Source/JavaScriptCore/runtime/JSFunction.cpp
index 4fc7568..fbedded 100644
--- a/Source/JavaScriptCore/runtime/JSFunction.cpp
+++ b/Source/JavaScriptCore/runtime/JSFunction.cpp
@@ -151,11 +151,6 @@
     return name(exec);
 }
 
-void JSFunction::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSFunction* thisObject = static_cast<JSFunction*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSFunction.h b/Source/JavaScriptCore/runtime/JSFunction.h
index 1e668e9..91c3ccf 100644
--- a/Source/JavaScriptCore/runtime/JSFunction.h
+++ b/Source/JavaScriptCore/runtime/JSFunction.h
@@ -135,7 +135,6 @@
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
         virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode = ExcludeDontEnumProperties);
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
     private:
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
index 98c11d4..996fc29 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
@@ -308,11 +308,6 @@
         oldLastInPrototypeChain->setPrototype(globalData, objectPrototype);
 }
 
-void JSGlobalObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 { 
     JSGlobalObject* thisObject = static_cast<JSGlobalObject*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSGlobalObject.h b/Source/JavaScriptCore/runtime/JSGlobalObject.h
index 3f0b85d..9dfad12 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalObject.h
+++ b/Source/JavaScriptCore/runtime/JSGlobalObject.h
@@ -175,7 +175,6 @@
     public:
         virtual ~JSGlobalObject();
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
diff --git a/Source/JavaScriptCore/runtime/JSObject.cpp b/Source/JavaScriptCore/runtime/JSObject.cpp
index 57899fa..a75c36a 100644
--- a/Source/JavaScriptCore/runtime/JSObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSObject.cpp
@@ -68,11 +68,6 @@
     }
 }
 
-void JSObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSObject* thisObject = static_cast<JSObject*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSObject.h b/Source/JavaScriptCore/runtime/JSObject.h
index 27b5cc0..21837ea 100644
--- a/Source/JavaScriptCore/runtime/JSObject.h
+++ b/Source/JavaScriptCore/runtime/JSObject.h
@@ -79,10 +79,11 @@
     public:
         typedef JSCell Base;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         ALWAYS_INLINE void visitChildrenDirect(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
+        virtual UString className() const;
+
         // The inline virtual destructor cannot be the first virtual function declared
         // in the class as it results in the vtable being generated as a weak symbol
         virtual ~JSObject();
@@ -93,8 +94,6 @@
         
         Structure* inheritorID(JSGlobalData&);
 
-        virtual UString className() const;
-
         JSValue get(ExecState*, const Identifier& propertyName) const;
         JSValue get(ExecState*, unsigned propertyName) const;
 
@@ -485,6 +484,11 @@
     return classInfo()->isSubClassOf(info);
 }
 
+inline const MethodTable* JSCell::methodTable() const
+{
+    return &classInfo()->methodTable;
+}
+
 // this method is here to be after the inline declaration of JSCell::inherits
 inline bool JSValue::inherits(const ClassInfo* classInfo) const
 {
diff --git a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
index 97025a4..abab79e 100644
--- a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
+++ b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
@@ -92,11 +92,6 @@
     return identifier;
 }
 
-void JSPropertyNameIterator::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSPropertyNameIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSPropertyNameIterator* thisObject = static_cast<JSPropertyNameIterator*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
index c6f6979..97a5032 100644
--- a/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
+++ b/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
@@ -58,7 +58,6 @@
             return Structure::create(globalData, globalObject, prototype, TypeInfo(CompoundType, OverridesVisitChildren), &s_info);
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         bool getOffset(size_t i, int& offset)
diff --git a/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp b/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp
index 31da80a..b6780ef 100644
--- a/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp
@@ -32,11 +32,6 @@
 namespace JSC {
 ASSERT_CLASS_FITS_IN_CELL(JSStaticScopeObject);
 
-void JSStaticScopeObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSStaticScopeObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSStaticScopeObject* thisObject = static_cast<JSStaticScopeObject*>(cell);
diff --git a/Source/JavaScriptCore/runtime/JSStaticScopeObject.h b/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
index 821178a9..792d4b0 100644
--- a/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
+++ b/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
@@ -41,7 +41,6 @@
             return scopeObject;
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         bool isDynamicScope(bool& requiresDynamicChecks) const;
         virtual JSObject* toThisObject(ExecState*) const;
diff --git a/Source/JavaScriptCore/runtime/JSValue.h b/Source/JavaScriptCore/runtime/JSValue.h
index 567da94..372bedd 100644
--- a/Source/JavaScriptCore/runtime/JSValue.h
+++ b/Source/JavaScriptCore/runtime/JSValue.h
@@ -54,6 +54,7 @@
 
     struct ClassInfo;
     struct Instruction;
+    struct MethodTable;
 
     template <class T> class WriteBarrierBase;
 
diff --git a/Source/JavaScriptCore/runtime/JSWrapperObject.cpp b/Source/JavaScriptCore/runtime/JSWrapperObject.cpp
index 69192fe..34df7ea 100644
--- a/Source/JavaScriptCore/runtime/JSWrapperObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSWrapperObject.cpp
@@ -26,9 +26,8 @@
 
 ASSERT_CLASS_FITS_IN_CELL(JSWrapperObject);
 
-void JSWrapperObject::visitChildrenVirtual(SlotVisitor& visitor) 
+JSWrapperObject::~JSWrapperObject()
 {
-    visitChildren(this, visitor);
 }
 
 void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
diff --git a/Source/JavaScriptCore/runtime/JSWrapperObject.h b/Source/JavaScriptCore/runtime/JSWrapperObject.h
index 7dd4b28..73713c0 100644
--- a/Source/JavaScriptCore/runtime/JSWrapperObject.h
+++ b/Source/JavaScriptCore/runtime/JSWrapperObject.h
@@ -44,8 +44,9 @@
         explicit JSWrapperObject(JSGlobalData&, Structure*);
         static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
+
+        virtual ~JSWrapperObject();
         
     private:
         WriteBarrier<Unknown> m_internalValue;
diff --git a/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp b/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
index 09c8705..f2e6bcc 100644
--- a/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
+++ b/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
@@ -37,11 +37,6 @@
 {
 }
 
-void NativeErrorConstructor::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void NativeErrorConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     NativeErrorConstructor* thisObject = static_cast<NativeErrorConstructor*>(cell);
diff --git a/Source/JavaScriptCore/runtime/NativeErrorConstructor.h b/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
index 0a2bb23..67f528d 100644
--- a/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
+++ b/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
@@ -71,7 +71,6 @@
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallDataVirtual(CallData&);
         static CallType getCallData(JSCell*, CallData&);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         WriteBarrier<Structure> m_errorStructure;
diff --git a/Source/JavaScriptCore/runtime/RegExpObject.cpp b/Source/JavaScriptCore/runtime/RegExpObject.cpp
index a5d7fe6..2b84324 100644
--- a/Source/JavaScriptCore/runtime/RegExpObject.cpp
+++ b/Source/JavaScriptCore/runtime/RegExpObject.cpp
@@ -78,11 +78,6 @@
 {
 }
 
-void RegExpObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void RegExpObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     RegExpObject* thisObject = static_cast<RegExpObject*>(cell);
diff --git a/Source/JavaScriptCore/runtime/RegExpObject.h b/Source/JavaScriptCore/runtime/RegExpObject.h
index e9664a4..e8af6d6 100644
--- a/Source/JavaScriptCore/runtime/RegExpObject.h
+++ b/Source/JavaScriptCore/runtime/RegExpObject.h
@@ -81,7 +81,6 @@
         void finishCreation(JSGlobalObject*);
         static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | Base::StructureFlags;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
     private:
diff --git a/Source/JavaScriptCore/runtime/ScopeChain.cpp b/Source/JavaScriptCore/runtime/ScopeChain.cpp
index e859c8c..6e2e034 100644
--- a/Source/JavaScriptCore/runtime/ScopeChain.cpp
+++ b/Source/JavaScriptCore/runtime/ScopeChain.cpp
@@ -29,6 +29,10 @@
 
 namespace JSC {
 
+ScopeChainNode::~ScopeChainNode()
+{
+}
+
 #ifndef NDEBUG
 
 void ScopeChainNode::print()
@@ -67,11 +71,6 @@
     return scopeDepth;
 }
 
-void ScopeChainNode::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void ScopeChainNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     ScopeChainNode* thisObject = static_cast<ScopeChainNode*>(cell);
diff --git a/Source/JavaScriptCore/runtime/ScopeChain.h b/Source/JavaScriptCore/runtime/ScopeChain.h
index ac52c67..48385d0 100644
--- a/Source/JavaScriptCore/runtime/ScopeChain.h
+++ b/Source/JavaScriptCore/runtime/ScopeChain.h
@@ -45,6 +45,8 @@
         {
         }
 
+        virtual ~ScopeChainNode();
+
     protected:
         void finishCreation(JSGlobalData* globalData, JSGlobalObject* globalObject)
         {
@@ -87,7 +89,6 @@
 #endif
         
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) { return Structure::create(globalData, globalObject, proto, TypeInfo(CompoundType, StructureFlags), &s_info); }
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         static JS_EXPORTDATA const ClassInfo s_info;
 
diff --git a/Source/JavaScriptCore/runtime/Structure.cpp b/Source/JavaScriptCore/runtime/Structure.cpp
index b67c87f..d7afa15 100644
--- a/Source/JavaScriptCore/runtime/Structure.cpp
+++ b/Source/JavaScriptCore/runtime/Structure.cpp
@@ -724,11 +724,6 @@
     }
 }
 
-void Structure::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void Structure::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     Structure* thisObject = static_cast<Structure*>(cell);
diff --git a/Source/JavaScriptCore/runtime/Structure.h b/Source/JavaScriptCore/runtime/Structure.h
index 958ad1b..84fdd7b 100644
--- a/Source/JavaScriptCore/runtime/Structure.h
+++ b/Source/JavaScriptCore/runtime/Structure.h
@@ -130,7 +130,6 @@
         JSValue storedPrototype() const { return m_prototype.get(); }
         JSValue prototypeForLookup(ExecState*) const;
         StructureChain* prototypeChain(ExecState*) const;
-        void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         Structure* previousID() const { ASSERT(structure()->classInfo() == &s_info); return m_previous.get(); }
diff --git a/Source/JavaScriptCore/runtime/StructureChain.cpp b/Source/JavaScriptCore/runtime/StructureChain.cpp
index a7362a9..2bd781d 100644
--- a/Source/JavaScriptCore/runtime/StructureChain.cpp
+++ b/Source/JavaScriptCore/runtime/StructureChain.cpp
@@ -43,11 +43,6 @@
 {
 }
 
-void StructureChain::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void StructureChain::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     StructureChain* thisObject = static_cast<StructureChain*>(cell);
diff --git a/Source/JavaScriptCore/runtime/StructureChain.h b/Source/JavaScriptCore/runtime/StructureChain.h
index 190c5c2..281f602 100644
--- a/Source/JavaScriptCore/runtime/StructureChain.h
+++ b/Source/JavaScriptCore/runtime/StructureChain.h
@@ -52,7 +52,6 @@
             return chain;
         }
         WriteBarrier<Structure>* head() { return m_vector.get(); }
-        void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype) { return Structure::create(globalData, globalObject, prototype, TypeInfo(CompoundType, OverridesVisitChildren), &s_info); }
diff --git a/Source/JavaScriptGlue/ChangeLog b/Source/JavaScriptGlue/ChangeLog
index 7be60e7..25bcdd6 100644
--- a/Source/JavaScriptGlue/ChangeLog
+++ b/Source/JavaScriptGlue/ChangeLog
@@ -1,3 +1,16 @@
+2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
+        https://bugs.webkit.org/show_bug.cgi?id=68839
+
+        Reviewed by Geoffrey Garen.
+
+        Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
+        de-virtualizing visitChildren.
+
+        * UserObjectImp.cpp:
+        * UserObjectImp.h:
+
 2011-09-27  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Add static version of JSCell::getCallData
diff --git a/Source/JavaScriptGlue/UserObjectImp.cpp b/Source/JavaScriptGlue/UserObjectImp.cpp
index 3b4144b..6325994 100644
--- a/Source/JavaScriptGlue/UserObjectImp.cpp
+++ b/Source/JavaScriptGlue/UserObjectImp.cpp
@@ -410,11 +410,6 @@
     return result;
 }
 
-void UserObjectImp::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void UserObjectImp::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     UserObjectImp* thisObject = static_cast<UserObjectImp*>(cell);
diff --git a/Source/JavaScriptGlue/UserObjectImp.h b/Source/JavaScriptGlue/UserObjectImp.h
index 0485435..2d56d4a 100644
--- a/Source/JavaScriptGlue/UserObjectImp.h
+++ b/Source/JavaScriptGlue/UserObjectImp.h
@@ -63,7 +63,6 @@
     virtual double toNumber(ExecState *exec) const;
     virtual UString toString(ExecState *exec) const;
 
-    virtual void visitChildrenVirtual(SlotVisitor&);
     static void visitChildren(JSCell*, SlotVisitor&);
 
     JSUserObject *GetJSUserObject() const;
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 62786ac..a129dc6 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,50 @@
+2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
+        https://bugs.webkit.org/show_bug.cgi?id=68839
+
+        Reviewed by Geoffrey Garen.
+
+        No new tests.
+
+        Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
+        de-virtualizing visitChildren.
+
+        * WebCore.exp.in:
+        * bindings/js/JSAttrCustom.cpp:
+        * bindings/js/JSAudioContextCustom.cpp:
+        * bindings/js/JSCSSRuleCustom.cpp:
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        * bindings/js/JSCanvasRenderingContextCustom.cpp:
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
+        (WebCore::JSDOMGlobalObject::finishCreation):
+        * bindings/js/JSDOMGlobalObject.h:
+        * bindings/js/JSDOMWindowCustom.cpp:
+        * bindings/js/JSDOMWindowShell.cpp:
+        * bindings/js/JSDOMWindowShell.h:
+        * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
+        * bindings/js/JSMessageChannelCustom.cpp:
+        * bindings/js/JSMessagePortCustom.cpp:
+        * bindings/js/JSNamedNodeMapCustom.cpp:
+        * bindings/js/JSNodeCustom.cpp:
+        * bindings/js/JSNodeFilterCustom.cpp:
+        * bindings/js/JSNodeIteratorCustom.cpp:
+        * bindings/js/JSSVGElementInstanceCustom.cpp:
+        * bindings/js/JSSharedWorkerCustom.cpp:
+        * bindings/js/JSStyleSheetCustom.cpp:
+        * bindings/js/JSTreeWalkerCustom.cpp:
+        * bindings/js/JSWebGLRenderingContextCustom.cpp:
+        * bindings/js/JSWorkerContextCustom.cpp:
+        * bindings/js/JSXMLHttpRequestCustom.cpp:
+        * bindings/js/JSXPathResultCustom.cpp:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateImplementation):
+        * bridge/qt/qt_instance.cpp:
+        * bridge/qt/qt_runtime.cpp:
+        * bridge/qt/qt_runtime.h:
+
 2011-09-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in
index 47041b0..2ee043d 100644
--- a/Source/WebCore/WebCore.exp.in
+++ b/Source/WebCore/WebCore.exp.in
@@ -814,7 +814,6 @@
 __ZN7WebCore6Editor7CommandC1Ev
 __ZN7WebCore6Editor7commandERKN3WTF6StringE
 __ZN7WebCore6Editor7outdentEv
-__ZN7WebCore6JSNode20visitChildrenVirtualERN3JSC11SlotVisitorE
 __ZN7WebCore6JSNode3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE
 __ZN7WebCore6JSNode6s_infoE
 __ZN7WebCore6Region5uniteERKS0_
diff --git a/Source/WebCore/bindings/js/JSAttrCustom.cpp b/Source/WebCore/bindings/js/JSAttrCustom.cpp
index 3b1086d..ac1ae60 100644
--- a/Source/WebCore/bindings/js/JSAttrCustom.cpp
+++ b/Source/WebCore/bindings/js/JSAttrCustom.cpp
@@ -39,11 +39,6 @@
 
 using namespace HTMLNames;
 
-void JSAttr::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSAttr::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSAttr* thisObject = static_cast<JSAttr*>(cell);
diff --git a/Source/WebCore/bindings/js/JSAudioContextCustom.cpp b/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
index 4e6a46d..5bfa35f 100644
--- a/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
+++ b/Source/WebCore/bindings/js/JSAudioContextCustom.cpp
@@ -39,11 +39,6 @@
 
 namespace WebCore {
 
-void JSAudioContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSAudioContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSAudioContext* thisObject = static_cast<JSAudioContext*>(cell);
diff --git a/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp b/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
index 71b06ce..4ecaa52 100644
--- a/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
@@ -48,11 +48,6 @@
 
 namespace WebCore {
 
-void JSCSSRule::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSCSSRule::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSCSSRule* thisObject = static_cast<JSCSSRule*>(cell);
diff --git a/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp b/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
index cd9acee..33d6af1 100644
--- a/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
@@ -43,11 +43,6 @@
 
 namespace WebCore {
 
-void JSCSSStyleDeclaration::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSCSSStyleDeclaration::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSCSSStyleDeclaration* thisObject = static_cast<JSCSSStyleDeclaration*>(cell);
diff --git a/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp b/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp
index da6028c..19379ad 100644
--- a/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp
+++ b/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp
@@ -39,11 +39,6 @@
 
 namespace WebCore {
 
-void JSCanvasRenderingContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSCanvasRenderingContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSCanvasRenderingContext* thisObject = static_cast<JSCanvasRenderingContext*>(cell);
diff --git a/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp b/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
index 6f4d2a6..45adb7b 100644
--- a/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
+++ b/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
@@ -49,17 +49,16 @@
 {
 }
 
+JSDOMGlobalObject::~JSDOMGlobalObject()
+{
+}
+
 void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData, JSObject* thisValue)
 {
     Base::finishCreation(globalData, thisValue);
     ASSERT(inherits(&s_info));
 }
 
-void JSDOMGlobalObject::visitChildrenVirtual(JSC::SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSDOMGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSDOMGlobalObject* thisObject = static_cast<JSDOMGlobalObject*>(cell);
diff --git a/Source/WebCore/bindings/js/JSDOMGlobalObject.h b/Source/WebCore/bindings/js/JSDOMGlobalObject.h
index 99a631f..e3c3287 100644
--- a/Source/WebCore/bindings/js/JSDOMGlobalObject.h
+++ b/Source/WebCore/bindings/js/JSDOMGlobalObject.h
@@ -47,6 +47,7 @@
         struct JSDOMGlobalObjectData;
 
         JSDOMGlobalObject(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<DOMWrapperWorld>);
+        virtual ~JSDOMGlobalObject();
         void finishCreation(JSC::JSGlobalData&, JSC::JSObject* thisValue);
 
     public:
@@ -64,7 +65,6 @@
         void setInjectedScript(JSObject*);
         JSObject* injectedScript() const;
 
-        virtual void visitChildrenVirtual(JSC::SlotVisitor&);
         static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
 
         DOMWrapperWorld* world() { return m_world.get(); }
diff --git a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
index adb051f..04b5b97 100644
--- a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
+++ b/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
@@ -77,11 +77,6 @@
 
 namespace WebCore {
 
-void JSDOMWindow::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSDOMWindow::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSDOMWindow* thisObject = static_cast<JSDOMWindow*>(cell);
diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.cpp b/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
index b776be3..1f2b9ed 100644
--- a/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
@@ -83,11 +83,6 @@
 // JSObject methods
 // ----
 
-void JSDOMWindowShell::visitChildrenVirtual(JSC::SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSDOMWindowShell::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSDOMWindowShell* thisObject = static_cast<JSDOMWindowShell*>(cell);
diff --git a/Source/WebCore/bindings/js/JSDOMWindowShell.h b/Source/WebCore/bindings/js/JSDOMWindowShell.h
index e9abc15..012d5b7 100644
--- a/Source/WebCore/bindings/js/JSDOMWindowShell.h
+++ b/Source/WebCore/bindings/js/JSDOMWindowShell.h
@@ -77,7 +77,6 @@
         void* operator new(size_t);
         static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | JSC::OverridesGetPropertyNames | Base::StructureFlags;
 
-        virtual void visitChildrenVirtual(JSC::SlotVisitor&);
         static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
         virtual JSC::UString className() const;
         virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
diff --git a/Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp b/Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp
index 004d8be..4ad4d4d 100644
--- a/Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp
+++ b/Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp
@@ -34,11 +34,6 @@
 
 namespace WebCore {
 
-void JSJavaScriptAudioNode::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSJavaScriptAudioNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSJavaScriptAudioNode* thisObject = static_cast<JSJavaScriptAudioNode*>(cell);
diff --git a/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp b/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
index fa19c9d..8a047a1 100644
--- a/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
@@ -33,11 +33,6 @@
 
 namespace WebCore {
 
-void JSMessageChannel::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSMessageChannel::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSMessageChannel* thisObject = static_cast<JSMessageChannel*>(cell);
diff --git a/Source/WebCore/bindings/js/JSMessagePortCustom.cpp b/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
index 9eed739..51ebf88 100644
--- a/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
+++ b/Source/WebCore/bindings/js/JSMessagePortCustom.cpp
@@ -42,11 +42,6 @@
 
 namespace WebCore {
 
-void JSMessagePort::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSMessagePort::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSMessagePort* thisObject = static_cast<JSMessagePort*>(cell);
diff --git a/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp b/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
index a10d52a..45a9ac0 100644
--- a/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
+++ b/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
@@ -35,11 +35,6 @@
 
 namespace WebCore {
 
-void JSNamedNodeMap::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 bool JSNamedNodeMap::canGetItemsForName(ExecState*, NamedNodeMap* impl, const Identifier& propertyName)
 {
     return impl->getNamedItem(identifierToString(propertyName));
diff --git a/Source/WebCore/bindings/js/JSNodeCustom.cpp b/Source/WebCore/bindings/js/JSNodeCustom.cpp
index 9715266..3f2f159 100644
--- a/Source/WebCore/bindings/js/JSNodeCustom.cpp
+++ b/Source/WebCore/bindings/js/JSNodeCustom.cpp
@@ -192,11 +192,6 @@
     return node;
 }
 
-void JSNode::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSNode* thisObject = static_cast<JSNode*>(cell);
diff --git a/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp b/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp
index 56081ec..e94098b 100644
--- a/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp
+++ b/Source/WebCore/bindings/js/JSNodeFilterCustom.cpp
@@ -36,11 +36,6 @@
 
 namespace WebCore {
 
-void JSNodeFilter::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSNodeFilter::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSNodeFilter* thisObject = static_cast<JSNodeFilter*>(cell);
diff --git a/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp b/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
index 7055946..813e000 100644
--- a/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
+++ b/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
@@ -29,11 +29,6 @@
 
 namespace WebCore {
 
-void JSNodeIterator::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSNodeIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSNodeIterator* thisObject = static_cast<JSNodeIterator*>(cell);
diff --git a/Source/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp b/Source/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp
index 87e6bf63..beb99a8 100644
--- a/Source/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp
@@ -35,11 +35,6 @@
 
 namespace WebCore {
 
-void JSSVGElementInstance::visitChildrenVirtual(JSC::SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSSVGElementInstance::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
 {
     JSSVGElementInstance* thisObject = static_cast<JSSVGElementInstance*>(cell);
diff --git a/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp b/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
index 9f39a14..4d9d22d 100644
--- a/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
+++ b/Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
@@ -43,11 +43,6 @@
 
 namespace WebCore {
 
-void JSSharedWorker::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSSharedWorker::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSSharedWorker* thisObject = static_cast<JSSharedWorker*>(cell);
diff --git a/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp b/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
index 2d726ab..5defbcc 100644
--- a/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
+++ b/Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
@@ -35,11 +35,6 @@
 
 namespace WebCore {
 
-void JSStyleSheet::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSStyleSheet::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSStyleSheet* thisObject = static_cast<JSStyleSheet*>(cell);
diff --git a/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp b/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
index 95edc05..57f23b0 100644
--- a/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
+++ b/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
@@ -29,11 +29,6 @@
 
 namespace WebCore {
 
-void JSTreeWalker::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSTreeWalker::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSTreeWalker* thisObject = static_cast<JSTreeWalker*>(cell);
diff --git a/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp b/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
index 0e47f53..5489b8a 100644
--- a/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
+++ b/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
@@ -192,11 +192,6 @@
     return jsNull();
 }
 
-void JSWebGLRenderingContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSWebGLRenderingContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSWebGLRenderingContext* thisObject = static_cast<JSWebGLRenderingContext*>(cell);
diff --git a/Source/WebCore/bindings/js/JSWorkerContextCustom.cpp b/Source/WebCore/bindings/js/JSWorkerContextCustom.cpp
index f900496..67f2e99 100644
--- a/Source/WebCore/bindings/js/JSWorkerContextCustom.cpp
+++ b/Source/WebCore/bindings/js/JSWorkerContextCustom.cpp
@@ -53,11 +53,6 @@
 
 namespace WebCore {
 
-void JSWorkerContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSWorkerContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSWorkerContext* thisObject = static_cast<JSWorkerContext*>(cell);
diff --git a/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp b/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
index 6091383..62f6169 100644
--- a/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
+++ b/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
@@ -54,11 +54,6 @@
 
 namespace WebCore {
 
-void JSXMLHttpRequest::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSXMLHttpRequest::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSXMLHttpRequest* thisObject = static_cast<JSXMLHttpRequest*>(cell);
diff --git a/Source/WebCore/bindings/js/JSXPathResultCustom.cpp b/Source/WebCore/bindings/js/JSXPathResultCustom.cpp
index 09942f5..2341b43 100644
--- a/Source/WebCore/bindings/js/JSXPathResultCustom.cpp
+++ b/Source/WebCore/bindings/js/JSXPathResultCustom.cpp
@@ -37,11 +37,6 @@
 
 namespace WebCore {
 
-void JSXPathResult::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSXPathResult::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSXPathResult* thisObject = static_cast<JSXPathResult*>(cell);
diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 684f237..0ae7e2c 100644
--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -878,7 +878,6 @@
 
     # visit function
     if ($needsMarkChildren) {
-        push(@headerContent, "    virtual void visitChildrenVirtual(JSC::SlotVisitor&);\n");
         push(@headerContent, "    static void visitChildren(JSCell*, JSC::SlotVisitor&);\n\n");
         $structureFlags{"JSC::OverridesVisitChildren"} = 1;
     }
@@ -2202,11 +2201,6 @@
         }
         
         if ($needsMarkChildren && !$dataNode->extendedAttributes->{"CustomMarkFunction"}) {
-            push(@implContent, "void ${className}::visitChildrenVirtual(SlotVisitor& visitor)\n");
-            push(@implContent, "{\n");
-            push(@implContent, "    visitChildren(this, visitor);\n");
-            push(@implContent, "}\n\n");
-
             push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n");
             push(@implContent, "{\n");
             push(@implContent, "    ${className}* thisObject = static_cast<${className}*>(cell);\n");
diff --git a/Source/WebCore/bridge/qt/qt_instance.cpp b/Source/WebCore/bridge/qt/qt_instance.cpp
index 7de98e8..0d61a60 100644
--- a/Source/WebCore/bridge/qt/qt_instance.cpp
+++ b/Source/WebCore/bridge/qt/qt_instance.cpp
@@ -62,11 +62,6 @@
     
     static const ClassInfo s_info;
 
-    virtual void visitChildrenVirtual(SlotVisitor& visitor)
-    {
-        visitChildren(this, visitor);
-    }
-
     static void visitChildren(JSCell* cell, SlotVisitor& visitor)
     {
         QtRuntimeObject* thisObject = static_cast<QtRuntimeObject*>(cell);
diff --git a/Source/WebCore/bridge/qt/qt_runtime.cpp b/Source/WebCore/bridge/qt/qt_runtime.cpp
index 67fcceb..5557b13 100644
--- a/Source/WebCore/bridge/qt/qt_runtime.cpp
+++ b/Source/WebCore/bridge/qt/qt_runtime.cpp
@@ -1439,11 +1439,6 @@
     d->m_allowPrivate = allowPrivate;
 }
 
-void QtRuntimeMetaMethod::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void QtRuntimeMetaMethod::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     QtRuntimeMetaMethod* thisObject = static_cast<QtRuntimeMetaMethod*>(cell);
diff --git a/Source/WebCore/bridge/qt/qt_runtime.h b/Source/WebCore/bridge/qt/qt_runtime.h
index 83e5a6c..9a27629 100644
--- a/Source/WebCore/bridge/qt/qt_runtime.h
+++ b/Source/WebCore/bridge/qt/qt_runtime.h
@@ -168,7 +168,6 @@
     virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
     virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
 
-    virtual void visitChildrenVirtual(SlotVisitor&);
     static void visitChildren(JSCell*, SlotVisitor&);
 
 protected: