Bug 62446 - [Chromium] Worker object may be garbage collected if it doesn't send any messages
Summary: [Chromium] Worker object may be garbage collected if it doesn't send any mess...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-10 03:28 PDT by Yury Semikhatsky
Modified: 2011-06-15 01:30 PDT (History)
7 users (show)

See Also:


Attachments
Test case (807 bytes, application/zip)
2011-06-10 03:28 PDT, Yury Semikhatsky
no flags Details
Patch (5.66 KB, patch)
2011-06-10 04:07 PDT, Yury Semikhatsky
dimich: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2011-06-10 03:28:53 PDT
Created attachment 96722 [details]
Test case

If there are no references to a dedicated worker object and no messages are sent to its worker context(which would increment unconfirmed messages counter which in turn would protect worker from being collected) then it may be garbage collected before a first message from worker context arrives. See attached page where messages from the worker context never reaches worker object. This works fine on other ports that use in-process workers.
Comment 1 Yury Semikhatsky 2011-06-10 04:07:15 PDT
Created attachment 96729 [details]
Patch
Comment 2 Dmitry Titov 2011-06-10 11:21:32 PDT
Did you mean r? it or is it still in the works?
Comment 3 Yury Semikhatsky 2011-06-14 05:36:55 PDT
(In reply to comment #2)
> Did you mean r? it or is it still in the works?

I wanted to run the test on Chromium to make sure that it passes there. Now the patch is ready for review.
Comment 4 Dmitry Titov 2011-06-14 10:51:57 PDT
Comment on attachment 96729 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=96729&action=review

r=me
I wonder if it improves flakiness of worker tests run in Chromium.

> Source/WebKit/chromium/ChangeLog:11
> +

"from it context" -> "from its context"
Comment 5 Yury Semikhatsky 2011-06-15 01:26:51 PDT
Committed r88914: <http://trac.webkit.org/changeset/88914>
Comment 6 Yury Semikhatsky 2011-06-15 01:30:34 PDT
(In reply to comment #4)
> (From update of attachment 96729 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=96729&action=review
> 
> r=me
> I wonder if it improves flakiness of worker tests run in Chromium.
> 
> > Source/WebKit/chromium/ChangeLog:11
> > +
> 
> "from it context" -> "from its context"

Done.