Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish up the implementation of EventSource #13774

Merged
merged 9 commits into from Nov 12, 2016

Conversation

@KiChjang
Copy link
Member

KiChjang commented Oct 14, 2016

Full implementation of EventSource, complete with closing and reopening streams.

Fixes #8925.


This change is Reviewable

@highfive
Copy link

highfive commented Oct 14, 2016

Heads up! This PR modifies the following files:

  • @fitzgen: components/script/dom/htmllinkelement.rs, components/script/dom/bindings/trace.rs, components/script/fetch.rs, components/script/dom/globalscope.rs, components/script/dom/xmlhttprequest.rs, components/script/network_listener.rs, components/script/dom/workerglobalscope.rs, components/script/task_source/networking.rs, components/script/dom/websocket.rs, components/script/dom/htmlscriptelement.rs, components/script/dom/htmlmediaelement.rs, components/script/dom/htmlimageelement.rs, components/script/dom/webidls/EventSource.webidl, components/script/dom/eventsource.rs, components/script/dom/window.rs, components/script/script_thread.rs
  • @KiChjang: components/script/dom/htmllinkelement.rs, components/script/dom/bindings/trace.rs, components/script/fetch.rs, components/script/dom/globalscope.rs, components/script/dom/xmlhttprequest.rs, components/script/network_listener.rs, components/script/dom/workerglobalscope.rs, components/script/task_source/networking.rs, components/script/dom/websocket.rs, components/script/dom/htmlscriptelement.rs, components/script/dom/htmlmediaelement.rs, components/script/dom/htmlimageelement.rs, components/script/dom/webidls/EventSource.webidl, components/script/dom/eventsource.rs, components/script/dom/window.rs, components/script/script_thread.rs, components/net_traits/request.rs, components/net_traits/request.rs
@highfive
Copy link

highfive commented Oct 14, 2016

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@KiChjang
Copy link
Member Author

KiChjang commented Oct 14, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 14, 2016

Trying commit 650383d with merge b3f92ec...

bors-servo added a commit that referenced this pull request Oct 14, 2016
Implement EventSource constructor, parse metadata in EventSource response

It still doesn't parse the event stream correctly, but it does announce and fail the connection correctly. Re-establishing the connection is not supported yet.

Partial #8925.
@bors-servo
Copy link
Contributor

bors-servo commented Oct 14, 2016

💔 Test failed - linux-rel-wpt

@KiChjang
Copy link
Member Author

KiChjang commented Oct 14, 2016

I believe there's still too many timeouts in EventSource and it's not worthwhile to enable it just yet.

@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from 650383d to c81ef97 Oct 15, 2016
@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from 1446403 to 555d576 Oct 16, 2016
@SimonSapin
Copy link
Member

SimonSapin commented Oct 17, 2016

@highfive highfive assigned frewsxcv and unassigned SimonSapin Oct 17, 2016
@frewsxcv
Copy link
Member

frewsxcv commented Oct 17, 2016

./components/script/task_source/networking.rs:19: tab on line
#[derive(JSTraceable, PartialEq, Copy, Clone, Debug, HeapSizeOf)]
enum EventSourceReadyState {
enum ReadyState {

This comment has been minimized.

@frewsxcv

frewsxcv Oct 17, 2016

Member

Can you add a comment here?

// https://html.spec.whatwg.org/multipage/#dom-eventsource-readystate
@frewsxcv
Copy link
Member

frewsxcv commented Oct 17, 2016

I can look through this, though I don't have much time over the next few days to do an in-depth review of this. Might be better to find someone else for the r+.

Is it true that there are not test expectation differences or have they not been updated?

@KiChjang
Copy link
Member Author

KiChjang commented Oct 17, 2016

@frewsxcv They haven't been updated yet, since I'm not entirely sure that it's worth enabling the tests again due to the amount of expected timeouts in the tests.

@frewsxcv
Copy link
Member

frewsxcv commented Oct 17, 2016

Considering websockets will be partially supported after this PR, would it make sense to enable them?

@jdm
Copy link
Member

jdm commented Oct 18, 2016

How are websockets related to EventSource? We already support websockets in Servo.

@frewsxcv
Copy link
Member

frewsxcv commented Oct 18, 2016

Blah, my bad, I was thinking "SSE" but said "websockets".

@KiChjang
Copy link
Member Author

KiChjang commented Oct 27, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Oct 27, 2016

Trying commit 555d576 with merge c6338be...

bors-servo added a commit that referenced this pull request Oct 27, 2016
Implement EventSource constructor, parse metadata in EventSource response

It still doesn't parse the event stream correctly, but it does announce and fail the connection correctly. Re-establishing the connection is not supported yet.

Partial #8925.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13774)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 27, 2016

💔 Test failed - linux-rel-css

@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from 555d576 to d6bfc10 Oct 27, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2016

The latest upstream changes (presumably #14083) made this pull request unmergeable. Please resolve the merge conflicts.

@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from a64cdd7 to 7a9097f Nov 10, 2016
@KiChjang
Copy link
Member Author

KiChjang commented Nov 10, 2016

Crap, something went wrong during rebase, will fix soon.

@bors-servo
Copy link
Contributor

bors-servo commented Nov 10, 2016

The latest upstream changes (presumably #14156) made this pull request unmergeable. Please resolve the merge conflicts.

@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from 7a9097f to 501175d Nov 11, 2016
@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from 501175d to 4018b4b Nov 11, 2016
@KiChjang KiChjang force-pushed the KiChjang:event-source-constructor branch from 4018b4b to a39d1fa Nov 11, 2016
@jdm
Copy link
Member

jdm commented Nov 12, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 12, 2016

📌 Commit a39d1fa has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 12, 2016

Testing commit a39d1fa with merge 579ab2d...

bors-servo added a commit that referenced this pull request Nov 12, 2016
Finish up the implementation of EventSource

Full implementation of EventSource, complete with closing and reopening streams.

Fixes #8925.

<!-- Reviewable:start -->

---

This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13774)

<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 12, 2016

@bors-servo bors-servo merged commit a39d1fa into servo:master Nov 12, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@KiChjang KiChjang deleted the KiChjang:event-source-constructor branch Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.