Summary: | addEventListener of MessagePort should also call start(), like onmessage | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zoltan Herczeg <zherczeg> | ||||
Component: | WebCore JavaScript | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED INVALID | ||||||
Severity: | Normal | CC: | ap, sam | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Zoltan Herczeg
2009-09-28 02:33:53 PDT
Created attachment 40223 [details]
fix for calling the call start()
This needs a regression test. Also, please explain why this should be so. I don't think the spec says that. (In reply to comment #3) > Also, please explain why this should be so. I don't think the spec says that. See the SharedWorker example here: http://www.whatwg.org/specs/web-workers/current-work/ See the code example after "The viewer is more involved:" worker.port.addEventListener('message', configure, false); is used instead of worker.port.onmessage = configure Moreover, more addEventListener (4, exactly) is applied for one worker object (actually I didn't tested that, yet) You think the example is wrong? How can I make regression test for Shared Workers? > See the SharedWorker example here: > http://www.whatwg.org/specs/web-workers/current-work/ The examples section is non-normative. We need to have this specified in normative text - I'd suggest e-mailing WhatWG mailing list about this issue. > How can I make regression test for Shared Workers? We have a number of tests for workers in LayoutTests/fast/workers, so you could use one of those as an example. According to the discussion on whatwg (http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-September/023246.html), this bug turned out to be a feature. And they will probably change the example to call worker.start() after the listeners added. I close this bug now. Days of debugging goes waste again. I am not a lucky person nowadays. |