Repository navigation
Implement document load cancellation - #21111
Conversation
|
Heads up! This PR modifies the following files:
|
|
Not ready for review yet... |
962e8e8 to
925b929
Compare
|
We should probably also use this opportunity to rename cancel to terminate, since that's the exact same term used by the spec. |
| // the user agent must abort any instance of the fetch algorithm opened by this EventSource. | ||
| self.canceller.borrow_mut().cancel(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Question on this: is the Drop of a Rust DomRoot going to be called when the associated JsObject is garbage collected in the JS engine?
(The above might be un-necessary since I've also added a change that make the globalscope keep a reference to all EventSource, and cancel them manually when needed, could still be a good backup ensuring we indeed always abort the fetch if the JSObject is garbarge collected)
…tsource, r=jdm Use remote-event task source in EventSource <!-- Please describe your changes on the following line: --> Follow up on #21126, this again 'changes nothing', but will be useful for #21111 in the context of #21114 Trying to break up work into smaller PR's ;) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #21112 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/21170) <!-- Reviewable:end -->
…tsource, r=jdm Use remote-event task source in EventSource <!-- Please describe your changes on the following line: --> Follow up on #21126, this again 'changes nothing', but will be useful for #21114 in the context of #21111. Trying to break up work into smaller PR's ;) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #21112 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/21170) <!-- Reviewable:end -->
…tsource, r=jdm Use remote-event task source in EventSource <!-- Please describe your changes on the following line: --> Follow up on #21126, this again 'changes nothing', but will be useful for #21114 in the context of #21111. Trying to break up work into smaller PR's ;) --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #21112 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/21170) <!-- Reviewable:end -->
0dd5c53 to
dcdebd8
Compare
|
|
||
| // TODO: https://github.com/servo/servo/issues/15236 | ||
| self.window.cancel_all_tasks(); | ||
| self.window.cancel_all_tasks_from_source(TaskSourceName::Networking); |
There was a problem hiding this comment.
This carries an assumption that all the tasks queued on the networking task source are fetches. I think it is ok for now, but we'd definitely want to leave a comment here clarifying the assumption.
There was a problem hiding this comment.
Good catch, I'll add a note.
| fn process_response_done(&mut self, aborted:bool) { | ||
| if aborted { | ||
| // https://html.spec.whatwg.org/multipage/ | ||
| // server-sent-events.html#sse-processing-model:fail-the-connection |
There was a problem hiding this comment.
Wrong link? I got https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model:fail-the-connection-3 which explains what happens when the fetch is aborted.
690dd2e to
99b7f30
Compare
|
@bors-servo try |
… r=<try> [WIP] Implement document load cancellation <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #19309 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/21111) <!-- Reviewable:end -->
|
💔 Test failed - linux-dev |
|
99b7f30 to
d91ce07
Compare
|
@bors-servo try (some servers still work, and I'd like to know where I stand in terms of the overall test suite) |
… r=<try> [WIP] Implement document load cancellation <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #19309 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/21111) <!-- Reviewable:end -->
|
💔 Test failed - linux-rel-css |
|
@bors-servo r+ |
|
📌 Commit dbdfda8 has been approved by |
… r=jdm Implement document load cancellation <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #19309 fix #21114 fix #21113 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/21111) <!-- Reviewable:end -->
|
💔 Test failed - arm32 |
|
More build machine disk space woes. |
|
This one has come back, and this time it's OK... |
|
@bors-servo retry |
|
💔 Test failed - linux-rel-wpt |
|
Ok, removed the |
|
@bors-servo r+ |
|
📌 Commit e67adfc has been approved by |
|
☀️ Test successful - android, android-x86, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is