CodeGeneratorJS's InstanceNeedsVisitChildren should not return true just because...
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jun 2017 00:12:51 +0000 (00:12 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jun 2017 00:12:51 +0000 (00:12 +0000)
commit4fc35ed76a03aa027ed67b4ae9ff14ffeb354f11
tree4cd07cd705bbf04cbe22b94b5f8e5e5080844077
parent1d0ca84765935dea1efe01c75b756221b10d6f62
CodeGeneratorJS's InstanceNeedsVisitChildren should not return true just because a class is / extends EventTarget.
https://bugs.webkit.org/show_bug.cgi?id=172782
<rdar://problem/32498266>

Reviewed by Chris Dumez.

No new tests needed.  This change is covered by existing binding tests.

InstanceNeedsVisitChildren should also not check the IsJSBuiltinConstructor
condition, which is not used to emit any additional code in the visitChildren
override.

The other conditions for generating visitChildren() are adequate if the class
needs to override visitChildren.  Currently, we're generating some visitChildren()
methods that only call its Base::visitChildren().  Removing the "is / extends
EventTarget" conditions removes those unneeded visitChildren overrides.

* bindings/scripts/CodeGeneratorJS.pm:
(InstanceNeedsVisitChildren):
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
(WebCore::JSTestClassWithJSBuiltinConstructor::visitChildren): Deleted.
* bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::JSTestDOMJIT::visitChildren): Deleted.
* bindings/scripts/test/JS/JSTestDOMJIT.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::visitChildren): Deleted.
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructor::visitChildren): Deleted.
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNode::visitChildren): Deleted.
* bindings/scripts/test/JS/JSTestNode.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.h
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNode.h