-
Notifications
You must be signed in to change notification settings - Fork 320
Avoid executing the code in the All Fetch Listeners Are Empty algorithm. #1676
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
Conversation
|
This looks good, but can you add a note that makes it clear that we're deliberately returning false for |
|
@annevk @youennf @asutherland This is a change to the "optimise for empty fetch listeners" feature (#1671). Previously, we were looking at both regular listeners, and |
Sure. I have added the note. |
Make the code aligned with the following specification update: w3c/ServiceWorker#1676 With the previous specification and code, event listener vector can be modified during the GetEffectiveFunction execution, which may bring unexpected vector state. Change-Id: I732c4c9ab2caebc49a7f4ef52640df7b8476d838 Bug: 1429201 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4394402 Commit-Queue: Yoshisato Yanagisawa <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Reviewed-by: Domenic Denicola <[email protected]> Cr-Commit-Position: refs/heads/main@{#1126483}
|
Hi, are there any updates on this? |
jakearchibald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Make the code aligned with the following specification update: w3c/ServiceWorker#1676 With the previous specification and code, event listener vector can be modified during the GetEffectiveFunction execution, which may bring unexpected vector state. (cherry picked from commit 5105ce3) Change-Id: I732c4c9ab2caebc49a7f4ef52640df7b8476d838 Bug: 1429201 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4394402 Commit-Queue: Yoshisato Yanagisawa <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Reviewed-by: Domenic Denicola <[email protected]> Cr-Original-Commit-Position: refs/heads/main@{#1126483} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4408837 Reviewed-by: Shunya Shishido <[email protected]> Reviewed-by: Minoru Chikamune <[email protected]> Cr-Commit-Position: refs/branch-heads/5615@{#1203} Cr-Branched-From: 9c6408e-refs/heads/main@{#1109224}
…er API Cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/chromium/src/+/4406580: Stop supporting { handleEvent }. M108 merge issues: content_unittests_bundle_data.filelist: Not present in 108, skipped; Only used in iOS tests on main Make the code aligned with the following specification update: w3c/ServiceWorker#1676 With the previous specification and code, event listener vector can be modified during the GetEffectiveFunction execution, which may bring unexpected vector state. (cherry picked from commit 5105ce37a6853d52ec97894bf6969b3c29a23afd) Change-Id: I732c4c9ab2caebc49a7f4ef52640df7b8476d838 Bug: 1429201 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4394402 Commit-Queue: Yoshisato Yanagisawa <[email protected]> Cr-Original-Commit-Position: refs/heads/main@{#1126483} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4406580 Commit-Queue: Roger Felipe Zanoni da Silva <[email protected]> Reviewed-by: Yoshisato Yanagisawa <[email protected]> Cr-Commit-Position: refs/branch-heads/5359@{#1449} Cr-Branched-From: 27d3765d341b09369006d030f83f582a29eb57ae-refs/heads/main@{#1058933} Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/474621 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Make the code aligned with the following specification update: w3c/ServiceWorker#1676 With the previous specification and code, event listener vector can be modified during the GetEffectiveFunction execution, which may bring unexpected vector state. (cherry picked from commit 5105ce3) Change-Id: I732c4c9ab2caebc49a7f4ef52640df7b8476d838 Bug: 1429201 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4394402 Commit-Queue: Yoshisato Yanagisawa <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Reviewed-by: Domenic Denicola <[email protected]> Cr-Original-Commit-Position: refs/heads/main@{#1126483} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4411225 Reviewed-by: Minoru Chikamune <[email protected]> Cr-Commit-Position: refs/branch-heads/5672@{#442} Cr-Branched-From: 5f2a724-refs/heads/main@{#1121455}
This is for stop calling Get for detecting an empty fetch listener. Benefit of the change is that it won't execute the Javascript, and drawback is that it just ignores an empty fetch listener defined as a handleEvent property. Since it is rare to configure the fetch event listener with the handleEvent property, not detecting empty function body for it should be negligible coverage reduction.
+@domenic
Preview | Diff