[Webkit-unassigned] [Bug 34014] WebSocket wrapper can be collected even if events are pending

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 29 15:52:07 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34014


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #47655|review?                     |review+
               Flag|                            |




--- Comment #2 from Alexey Proskuryakov <ap at webkit.org>  2010-01-29 15:52:07 PST ---
(From update of attachment 47655)
+    LOG(Network, "WebSocket %p scriptExecutionContext destroyed", this);

There may be too many logs long term - very useful when writing the code, but
perhaps overly noisy when debugging other network-related issues.

We'll need to review the use of LOG() in WebSocket code as it matures.

I'd love to see per-function comments - the addition of contextDestroyed()
really needs an explanation of why it was needed. Actually, is it also a fix
for bug 33248?

+    if (m_channel)
+        ActiveDOMObject::unsetPendingActivity(this);
+    m_channel = 0;

Accessing "this" after unsetPendingActivity seems dangerous. I don't see how
this can cause issues with current code, but that's the call that lets the
object get deleted eventually. I think that it would be good defensive
programming to move access to m_channel up.

r=me. Please consider addressing the comments about ChangeLog and m_channel.

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



More information about the webkit-unassigned mailing list