RESOLVED INVALID 29801
addEventListener of MessagePort should also call start(), like onmessage
https://bugs.webkit.org/show_bug.cgi?id=29801
Summary addEventListener of MessagePort should also call start(), like onmessage
Zoltan Herczeg
Reported 2009-09-28 02:33:53 PDT
My qestion is: should we do it all the time, or only when eventType is "message". In case of the latter, where should I create a global string "message"?
Attachments
fix for calling the call start() (1.55 KB, patch)
2009-09-28 03:37 PDT, Zoltan Herczeg
sam: review-
Zoltan Herczeg
Comment 1 2009-09-28 03:37:22 PDT
Created attachment 40223 [details] fix for calling the call start()
Sam Weinig
Comment 2 2009-09-28 09:57:16 PDT
This needs a regression test.
Alexey Proskuryakov
Comment 3 2009-09-28 10:18:32 PDT
Also, please explain why this should be so. I don't think the spec says that.
Zoltan Herczeg
Comment 4 2009-09-28 10:44:37 PDT
(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?
Alexey Proskuryakov
Comment 5 2009-09-28 11:05:16 PDT
> 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.
Zoltan Herczeg
Comment 6 2009-09-29 10:41:42 PDT
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.
Note You need to log in before you can comment on or make changes to this bug.