Closed Bug 1445740 Opened 6 years ago Closed 6 years ago

Port EventSource in Web Workers to WorkerRef

Categories

(Core :: DOM: Workers, enhancement, P2)

58 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: baku, Assigned: baku)

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Attached patch ptr_eventSource.patch (obsolete) — Splinter Review
Attachment #8958938 - Flags: review?(bugs)
Comment on attachment 8958938 [details] [diff] [review]
ptr_eventSource.patch

about the test.

"When the object is created its readyState must be set to CONNECTING (0). "

"When a user agent is to fail the connection, the user agent must queue a task which, if the readyState attribute is set to a value other than CLOSED"
So I don't understand why readystate could be synchronously set to CLOSED (only explicit close() call does it synchronously.)
Attachment #8958938 - Flags: review?(bugs) → review-
Comment on attachment 8958938 [details] [diff] [review]
ptr_eventSource.patch

ok, baku pointed out the spec is a tad unclear. 
There is "If a user agent is to forcibly close an EventSource object (this happens when a Document object goes away permanently), the user agent must abort any instances of the fetch algorithm started for this EventSource object, and must set the readyState attribute to CLOSED."
Attachment #8958938 - Flags: review- → review?(bugs)
Attached patch ptr_eventSource.patch (obsolete) — Splinter Review
Attachment #8958938 - Attachment is obsolete: true
Attachment #8958938 - Flags: review?(bugs)
Attachment #8959104 - Flags: review?(bugs)
Comment on attachment 8959104 [details] [diff] [review]
ptr_eventSource.patch

url handling during shutdown is wrong.
Attachment #8959104 - Flags: review?(bugs) → review-
Priority: -- → P2
I had to split the initialization and the connection in 2 separate runnables. In this way I can do the initialization immediately. Then I create the WorkerRef, and if this succeeds, the connection runnable is dispatched.
Attachment #8959104 - Attachment is obsolete: true
Attachment #8959254 - Flags: review?(bugs)
Attachment #8959254 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/83cf16540410
Port EventSource in Web Workers to WorkerRef, r=smaug
Created web-platform-tests PR https://github.com/w3c/web-platform-tests/pull/10061 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
https://hg.mozilla.org/mozilla-central/rev/83cf16540410
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: