[Webkit-unassigned] [Bug 62292] New: Worker object may be garbage collected even if it has message handlers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 8 09:34:40 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=62292
Summary: Worker object may be garbage collected even if it has
message handlers
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: yurys at chromium.org
CC: dimich at chromium.org, levin at chromium.org,
pfeldman at chromium.org
Currently if you create a dedicated worker by calling the following function:
function createWorker() {
var worker = new Worker("worker.js");
worker.onmessage = function(event) {
console.log("Message from worker: " + event.data);
};
worker.postMessage("ping");
}
the worker object may well be GC'ed before any message from the worker
context is received. This behavior looks confusing. The spec doesn't say
anything specific about this while in many examples there no references
to the worker object to which onmessage/onerror handlers are attached which
means that those samples may be affected by this issue.
Should we protect the worker from being collected while it has message
handlers? Probably this problem has already been discussed.
--
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