Bug 114784

Summary: CodeGeneratorJS.pm should generate "isFiringEventListeners()" check in isReachableFromOpaqueRoots()
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: WebCore JavaScriptAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ggaren, jberlin, kling
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jer Noble 2013-04-17 21:55:04 PDT
For classes which inherit from EventTarget, the generator should add an isFiringEventListeners() check to the generated isReachableFromOpaqueRoots() function.
Comment 1 Jer Noble 2013-04-17 22:05:10 PDT
Created attachment 198679 [details]
Patch
Comment 2 Andreas Kling 2013-04-18 05:53:52 PDT
Can we remove the isFiringEventListeners() checks from the custom bindings for Node, TextTrack, TextTrackCue and TextTrackList with this change?
Comment 3 Jer Noble 2013-04-18 08:18:16 PDT
(In reply to comment #2)
> Can we remove the isFiringEventListeners() checks from the custom bindings for Node, TextTrack, TextTrackCue and TextTrackList with this change?

I was going to do it in a follow-up patch, but yes, we totally could.
Comment 4 Geoffrey Garen 2013-04-18 10:48:18 PDT
Comment on attachment 198679 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2013-04-18 13:38:16 PDT
Comment on attachment 198679 [details]
Patch

Clearing flags on attachment: 198679

Committed r148700: <http://trac.webkit.org/changeset/148700>
Comment 6 WebKit Commit Bot 2013-04-18 13:38:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Jessie Berlin 2013-04-18 16:09:08 PDT
This patch broke the bindings-generation tests:

http://build.webkit.org/builders/Apple%20Lion%20Debug%20WK1%20%28Tests%29/builds/8189/steps/bindings-generation-tests/logs/stdio

PASS: (JS) JSTestCallback.cpp
PASS: (JS) JSTestCallback.h
PASS: (JS) JSTestCustomNamedGetter.cpp
PASS: (JS) JSTestCustomNamedGetter.h
PASS: (JS) JSTestActiveDOMObject.cpp
PASS: (JS) JSTestActiveDOMObject.h
PASS: (JS) JSTestEventConstructor.cpp
PASS: (JS) JSTestEventConstructor.h
FAIL: (JS) JSTestEventTarget.cpp
--- WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp	2013-04-18 13:26:25.000000000 -0700
+++ /var/folders/_c/vr7s8m291vz90n5ffhf72nnw0000gn/T/tmp7N_ZlU/JSTestEventTarget.cpp	2013-04-18 15:31:34.000000000 -0700
@@ -326,6 +326,8 @@
 bool JSTestEventTargetOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
     JSTestEventTarget* jsTestEventTarget = jsCast<JSTestEventTarget*>(handle.get().asCell());
+    if (jsTestEventTarget->impl()->isFiringEventListeners())
+        return true;
     if (!isObservable(jsTestEventTarget))
         return false;
     UNUSED_PARAM(visitor);

I notified Jer and he is going to fix them.