chore: cherry-pick 2b30a50d0e62 from chromium #38058
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[M112] Use ScriptState::Scope instead of setting HandleScope.
Since
GetEffectiveFunction
may callGet
if the given v8 listener isan object, we need to prepare
v8::Context::Scope
before calling it.Blink already have a helper class to prepare the environment for the
script execution, which has already been used used in other
ServiceWorkerGlobalScope member functions. It is
ScriptState::Scope
This CL also use it instead.
(cherry picked from commit 299385e09d41d5ce3abd434879b5f9b0a8880cd7)
Bug: 1429197
Change-Id: Idbcfdfa9c06160a18b57155a9540f72eed4ec0b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4387655
Commit-Queue: Yoshisato Yanagisawa yyanagisawa@chromium.org
Commit-Queue: Kouhei Ueno kouhei@chromium.org
Reviewed-by: Leszek Swirski leszeks@chromium.org
Auto-Submit: Yoshisato Yanagisawa yyanagisawa@chromium.org
Reviewed-by: Kouhei Ueno kouhei@chromium.org
Cr-Original-Commit-Position: refs/heads/main@{#1125148}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4411454
Reviewed-by: Shunya Shishido sisidovski@chromium.org
Cr-Commit-Position: refs/branch-heads/5615@{#1191}
Cr-Branched-From: 9c6408ef696e83a9936b82bbead3d41c93c82ee4-refs/heads/main@{#1109224}
Ref electron/security#314
Notes: Security: backported fix for CVE-2023-2133.