[Webkit-unassigned] [Bug 24152] Move the logic to do the unconfirmed message count and pending activity setting from WorkerMessagingProxy to Worker.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 27 01:24:49 PST 2009


ap at webkit.org changed:

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

------- Comment #13 from ap at webkit.org  2009-02-27 01:24 PDT -------
(From update of attachment 28016)
+    bool hasPendingActivity = !m_askedToTerminate &&
(m_unconfirmedMessageCount || m_workerContextHadPendingActivity);
+    return hasPendingActivity || ActiveDOMObject::hasPendingActivity();

This variable name is not helpful. I suggest workerContextHasPendingActivity.

+        bool m_askedToTerminate;

Why duplicate this member variable in Worker when it's already available in the

-        m_unconfirmedMessageCount = taskCount;
-        m_workerThreadHadPendingActivity = true; // Worker initialization
means a pending activity.
+        m_workerObject->reportPendingActivity(false, true); // Worker
initialization means a pending activity.

This patch makes workers that failed to load leak. Previously,
m_unconfirmedMessageCount was only set to non-zero after creating the thread,
so messages posted to a worker that never spawned a thread didn't count as
activity. Consider the following test:

var worker = new Worker("does-not-exist.js");
worker = null;

Configure bugmail: https://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