[Webkit-unassigned] [Bug 12850] Leaks >10k objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 22 00:32:49 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12850


ian.eng.webkit at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13311|                            |review?
               Flag|                            |




------- Comment #1 from ian.eng.webkit at gmail.com  2007-02-22 00:32 PDT -------
Created an attachment (id=13311)
 --> (http://bugs.webkit.org/attachment.cgi?id=13311&action=view)
fix RemoveEventListener

I think the problem is in kjs_window.cpp, Window::getJSEventListener, which
creates a JSEventListener object if it does not exist. The constructor of
JSEventListener makes JSValue GC-protected.

In Window::RemoveEventListener and DOMEventTargetNode::RemoveEventListener,
both calls getJSEventListener to check if a listener exists. This leaks both
JSEventListener and the JavaScript event listener object.

I added a new function Window::hasJSEventListener for checking if a
JSEventListener exists for a JS event listener object without creating a new
one.

Before the change, run-safari and visit Gmail, then exist. Safari reports:
LEAK: 2102 Node
LEAK: 158688 KJS::Node

After applying the patch, no message reported.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list