Repository navigation
Make the service worker send custom response - #12582
Conversation
|
Heads up! This PR modifies the following files:
|
|
r? @jdm |
|
-S-awaiting-review +S-needs-code-changes Reviewed 5 of 5 files at r1. components/script/dom/abstractworker.rs, line 21 [r1] (raw file):
Could create a separate ServiceWorkerScriptMsg that includes this and a WorkerScriptMsg variant? I'm not sure about all the places where we store senders and receivers, but it would be nice to avoid introducing another message that's only used by one worker type. Comments from Reviewable |
|
Reviewed 2 of 2 files at r2. Comments from Reviewable |
|
Review status: 0 of 4 files reviewed at latest revision, 1 unresolved discussion. components/script/dom/abstractworker.rs, line 21 [r1] (raw file):
|
|
-S-awaiting-review +S-needs-code-changes Reviewed 5 of 5 files at r3. components/script/serviceworker_manager.rs, line 153 [r3] (raw file):
This should probably guard the components/script/dom/serviceworkerglobalscope.rs, line 44 [r3] (raw file):
What if we replace these two variants with a Comments from Reviewable |
| }, | ||
| WorkerScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan)) => { | ||
| ServiceWorkerScriptMsg::CommonWorker(WorkerScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan))) => { | ||
| let scope = self.upcast::<WorkerGlobalScope>(); |
There was a problem hiding this comment.
@jdm I've made that change adding CommonWorker, but i think this becomes very nested in matching in handle_script_event. Also not sure to reformat the match arms as it exceeds tidy's line length check. Suggestions ?
|
-S-awaiting-review +S-needs-code-changes Reviewed 2 of 2 files at r4. components/script/dom/serviceworkerglobalscope.rs, line 241 [r4] (raw file):
|
Make the service worker send custom response <!-- 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: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests because "refactor". <!-- 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/12582) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
|
@bors-servo retry
|
|
⌛ Testing commit 36dbd27 with merge 84ae36e... |
|
💔 Test failed - mac-rel-wpt |
|
@bors-servo retry
|
|
⌛ Testing commit 36dbd27 with merge a6ab739... |
Make the service worker send custom response <!-- 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: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests because "refactor". <!-- 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/12582) <!-- Reviewable:end -->
|
💔 Test failed - mac-rel-wpt |
|
@bors-servo retry
|
|
⌛ Testing commit 36dbd27 with merge 3d976cc... |
Make the service worker send custom response <!-- 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: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] These changes do not require tests because "refactor". <!-- 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/12582) <!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is