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

Handle Shared-Storage-Write as a single batchUpdate(); Respect withLo… #205

Merged
merged 5 commits into from
Nov 11, 2024

Conversation

xyaoinum
Copy link
Collaborator

@xyaoinum xyaoinum commented Oct 31, 2024

…ck for inner methods within batchUpdate()

Two revisions to our initial proposal:

  1. For Shared-Storage-Write, our initial proposal included individual methods like set(), append(), delete(), and clear(), alongside a batchUpdate() method requiring a serialized string for its methods parameter. To make things simpler, we revise the proposal to treat everything as a single batchUpdate(). It's backward compatible.

  2. Our initial proposal ignored the withLock option for individual methods within a batchUpdate() operation. This approach lacked flexibility and could lead to unintended behavior, as developers might assume the lock should still be acquired. We've revised the proposal to respect the withLock option for each individual method within the batch.

…ck for inner methods within batchUpdate()

Two revisions to our initial proposal:

1. Our initial proposal included individual methods like set(), append(), delete(), and clear(), alongside a batchUpdate() method requiring a serialized string for its `methods` parameter. To make things simpler, we revise the proposal to treat everything as a single batchUpdate().

2. Our initial proposal ignored the `withLock` option for individual methods within a batchUpdate() operation. This approach lacked flexibility and could lead to unintended behavior, as developers might assume the lock should still be acquired. We've revised the proposal to respect the `withLock` option for each individual method within the batch.
@xyaoinum
Copy link
Collaborator Author

@pythagoraskitty / @jkarlin : PTAL. Thanks!

@pythagoraskitty
Copy link
Collaborator

Should there be any updates to the examples section for response headers?

Otherwise I think it is looking good % my question above. I will take another pass if you make more changes. :)

@xyaoinum
Copy link
Collaborator Author

xyaoinum commented Nov 5, 2024

Should there be any updates to the examples section for response headers?

Updated to using batchUpdate() (although the original example should also be valid, as a batchUpdate() without locks should be equivalent to executing individual methods in sequence). I also included two examples within the From response headers section.

Copy link
Collaborator

@jkarlin jkarlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/ comment

README.md Show resolved Hide resolved
@xyaoinum xyaoinum merged commit 44ecf99 into main Nov 11, 2024
1 check passed
@xyaoinum xyaoinum deleted the yao-update-web-locks-header branch November 14, 2024 17:43
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 25, 2024
…d SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 26, 2024
… headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 26, 2024
… headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 28, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 28, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 30, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 30, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: Joe Mason <joenotcharles@google.com>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 1, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359

UltraBlame original commit: 452dfd2d01858996047826957a14f49748455f2f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Dec 1, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Kenichi Ishibashi <bashichromium.org>
Reviewed-by: Hidehiko Abe <hidehikochromium.org>
Reviewed-by: Joe Mason <joenotcharlesgoogle.com>
Reviewed-by: Rakina Zata Amni <rakinachromium.org>
Cr-Commit-Position: refs/heads/main{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376

UltraBlame original commit: 880a4df5d51660e9cb2d441528e85800b42a9315
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 1, 2024
…odifier options for Window and SharedStorageWorklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement 'with_lock' modifier options for Window and SharedStorageWorklet

Implement the { withLock: <lock resource name> } option for the
modifier methods for Window and SharedStorageWorklet context. The
SharedStorageLockManager manages the state of the locks and locked
requests. It acts as the LockRequest receiver to listen to Granted()
calls to resolve those requests. The locks uses the shared storage
origin as the partitioning origin, and thus can interact with the
regular Web Locks API (i.e. navigator.locks.request()) from within
the shared storage worklet.

The locking function is gated behind
features::kSharedStorageWebLocks, which is checked in the browser
process in SharedStorageLockManager::SharedStorageUpdate().

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

Bug: 373899210
Change-Id: I7003d392076a65a9ff2d277f9f0c2791436d2f68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6020796
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1387751}

--

wpt-commits: 7e168195e3629f88bef6293c18ae8674f90893fd
wpt-pr: 49359

UltraBlame original commit: 452dfd2d01858996047826957a14f49748455f2f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Dec 1, 2024
…ion for methods from response headers, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement with_lock option for methods from response headers

Explainer PR(s):
- WICG/shared-storage#199
- WICG/shared-storage#205

How:
- Add the parameter parsing logic in the network service, and send the
  final request to the browser process's central
  SharedStorageLockManager component.
- Since SharedStorageLockManager::SharedStorageUpdate() hides the
  exact database result, we update observer's OnMethodFinished()'s
  parameters accordingly. In the test observer, the error message is
  further transformed into a boolean 'success' result. This callback
  is only used in tests and it's not important to assert the detailed
  result anyway.
- A new test, `SharedStorageHeaderObserverTest.Append_NoCapacity`,
  has been added to demonstrate the case where `SharedStorageUpdate`
  encounters an error.

Bug: 373899210
Change-Id: I4588c83174d465e7248cc1f41c9b7a693aa326f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6042601
Reviewed-by: Gary Kacmarcik <garykacchromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Kenichi Ishibashi <bashichromium.org>
Reviewed-by: Hidehiko Abe <hidehikochromium.org>
Reviewed-by: Joe Mason <joenotcharlesgoogle.com>
Reviewed-by: Rakina Zata Amni <rakinachromium.org>
Cr-Commit-Position: refs/heads/main{#1388298}

--

wpt-commits: 7658fedd9f51c501150e3b70705e48e81887a095
wpt-pr: 49376

UltraBlame original commit: 880a4df5d51660e9cb2d441528e85800b42a9315
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 3, 2025
Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
aarongable pushed a commit to chromium/chromium that referenced this pull request Jan 3, 2025
Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401673}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 3, 2025
Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401673}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 3, 2025
Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401673}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 3, 2025
… worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeant@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401696}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 3, 2025
… worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeant@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401696}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 8, 2025
… worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 9, 2025
… worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403952}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 9, 2025
… worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403952}
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jan 10, 2025
….batchUpdate() for PA worklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement sharedStorage.batchUpdate() for PA worklet

Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401673}

--

wpt-commits: 078605da614507d4428c3cc92040ad750959018f
wpt-pr: 49893
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jan 10, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Revert "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeant@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401696}

--

wpt-commits: 7ceee79ca23ba6491a966206a7a6c34c3738fe60
wpt-pr: 49895
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 10, 2025
….batchUpdate() for PA worklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement sharedStorage.batchUpdate() for PA worklet

Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401673}

--

wpt-commits: 078605da614507d4428c3cc92040ad750959018f
wpt-pr: 49893
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 10, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Revert "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeant@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401696}

--

wpt-commits: 7ceee79ca23ba6491a966206a7a6c34c3738fe60
wpt-pr: 49895
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 13, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Reland "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403952}

--

wpt-commits: 7d409e8d192247cc8131665c486977213b925257
wpt-pr: 49976
sadym-chromium pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 14, 2025
Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401673}
sadym-chromium pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 14, 2025
… worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeant@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeant@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401696}
sadym-chromium pushed a commit to web-platform-tests/wpt that referenced this pull request Jan 14, 2025
… worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403952}
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jan 14, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Reland "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxia@chromium.org>
> Reviewed-by: Maks Orlovich <morlovich@chromium.org>
> Reviewed-by: Cammie Smith Barnes <cammie@chromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortuno@chromium.org>
Commit-Queue: Yao Xiao <yaoxia@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1403952}

--

wpt-commits: 7d409e8d192247cc8131665c486977213b925257
wpt-pr: 49976
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jan 16, 2025
….batchUpdate() for PA worklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement sharedStorage.batchUpdate() for PA worklet

Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Cr-Commit-Position: refs/heads/main{#1401673}

--

wpt-commits: 078605da614507d4428c3cc92040ad750959018f
wpt-pr: 49893

UltraBlame original commit: 6c9bb3d400ca57aa2228bc148ec78a317433e0bc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jan 16, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Revert "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxiachromium.org>
> Reviewed-by: Maks Orlovich <morlovichchromium.org>
> Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
> Cr-Commit-Position: refs/heads/main{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeantchromium.org>
Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeantchromium.org>
Cr-Commit-Position: refs/heads/main{#1401696}

--

wpt-commits: 7ceee79ca23ba6491a966206a7a6c34c3738fe60
wpt-pr: 49895

UltraBlame original commit: 6cd08500ad8b64636cf150d3d9d253e48705bedd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jan 16, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Reland "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxiachromium.org>
> Reviewed-by: Maks Orlovich <morlovichchromium.org>
> Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
> Cr-Commit-Position: refs/heads/main{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1403952}

--

wpt-commits: 7d409e8d192247cc8131665c486977213b925257
wpt-pr: 49976

UltraBlame original commit: 3a359b9243066e47f2bbe59b772e85fd2f96ed7d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 16, 2025
….batchUpdate() for PA worklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement sharedStorage.batchUpdate() for PA worklet

Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Cr-Commit-Position: refs/heads/main{#1401673}

--

wpt-commits: 078605da614507d4428c3cc92040ad750959018f
wpt-pr: 49893

UltraBlame original commit: 6c9bb3d400ca57aa2228bc148ec78a317433e0bc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 16, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Revert "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxiachromium.org>
> Reviewed-by: Maks Orlovich <morlovichchromium.org>
> Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
> Cr-Commit-Position: refs/heads/main{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeantchromium.org>
Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeantchromium.org>
Cr-Commit-Position: refs/heads/main{#1401696}

--

wpt-commits: 7ceee79ca23ba6491a966206a7a6c34c3738fe60
wpt-pr: 49895

UltraBlame original commit: 6cd08500ad8b64636cf150d3d9d253e48705bedd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jan 16, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Reland "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxiachromium.org>
> Reviewed-by: Maks Orlovich <morlovichchromium.org>
> Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
> Cr-Commit-Position: refs/heads/main{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1403952}

--

wpt-commits: 7d409e8d192247cc8131665c486977213b925257
wpt-pr: 49976

UltraBlame original commit: 3a359b9243066e47f2bbe59b772e85fd2f96ed7d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2025
….batchUpdate() for PA worklet, a=testonly

Automatic update from web-platform-tests
[shared storage] Implement sharedStorage.batchUpdate() for PA worklet

Add sharedStorage.batchUpdate() function. Parse arguments into
the 'methods' sequence and a 'with_lock' optional flag, and
propagate the result to the browser process to invoke the
`SharedStorageLockManager::SharedStorageBatchUpdate()` API.

This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
Lock integration proposal:
- WICG/shared-storage#199
- WICG/shared-storage#205

Fuchsia-Binary-Size: Size increase is unavoidable.
Bug: 373899210
Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Cr-Commit-Position: refs/heads/main{#1401673}

--

wpt-commits: 078605da614507d4428c3cc92040ad750959018f
wpt-pr: 49893

UltraBlame original commit: 6c9bb3d400ca57aa2228bc148ec78a317433e0bc
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Revert "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This reverts commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af.

Reason for revert: New tests are failing on linux-chromeos-dbg:

https://ci.chromium.org/ui/p/chromium/builders/ci/linux-chromeos-dbg/38480/test-results

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxiachromium.org>
> Reviewed-by: Maks Orlovich <morlovichchromium.org>
> Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
> Cr-Commit-Position: refs/heads/main{#1401673}

Bug: 373899210
Change-Id: I46c27d924dae0684a07ec081095d8dbde970b6ca
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6123546
Owners-Override: Tim Sergeant <tsergeantchromium.org>
Bot-Commit: Rubber Stamper <rubber-stamperappspot.gserviceaccount.com>
Commit-Queue: Tim Sergeant <tsergeantchromium.org>
Cr-Commit-Position: refs/heads/main{#1401696}

--

wpt-commits: 7ceee79ca23ba6491a966206a7a6c34c3738fe60
wpt-pr: 49895

UltraBlame original commit: 6cd08500ad8b64636cf150d3d9d253e48705bedd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jan 16, 2025
…dStorage.batchUpdate() for PA worklet", a=testonly

Automatic update from web-platform-tests
Reland "[shared storage] Implement sharedStorage.batchUpdate() for PA worklet"

This is a reland of commit f0cab8e2346b2a62aa3be1d5a41ec7737bf335af

The original CL incorrectly attempted to access
args[0].As<v8::Object>() even when the initial IDL validation
(args_converter.is_success() && !args[0]->IsObject()) failed. This
could lead to unpredictable behavior as args[0] might not be a valid
object. This reland fixes this by ensuring that
args[0].As<v8::Object>() is only accessed when
args_converter.is_success() is true.

Code changes: see the diff between Patchset 1 and Patchset 2

Original change's description:
> [shared storage] Implement sharedStorage.batchUpdate() for PA worklet
>
> Add sharedStorage.batchUpdate() function. Parse arguments into
> the 'methods' sequence and a 'with_lock' optional flag, and
> propagate the result to the browser process to invoke the
> `SharedStorageLockManager::SharedStorageBatchUpdate()` API.
>
> This allows developers to perform multiple Shared Storage operations atomically within a single lock, as part of the Web
> Lock integration proposal:
> - WICG/shared-storage#199
> - WICG/shared-storage#205
>
> Fuchsia-Binary-Size: Size increase is unavoidable.
> Bug: 373899210
> Change-Id: Ic6e9f794d78523ec9f6b87f37fb5e91f17635c58
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6072850
> Commit-Queue: Yao Xiao <yaoxiachromium.org>
> Reviewed-by: Maks Orlovich <morlovichchromium.org>
> Reviewed-by: Cammie Smith Barnes <cammiechromium.org>
> Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
> Cr-Commit-Position: refs/heads/main{#1401673}

Bug: 373899210
Change-Id: I1782e6af1de95cc643053aa80c2a15f601da56a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6132126
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Reviewed-by: Giovanni Ortuno Urquidi <ortunochromium.org>
Commit-Queue: Yao Xiao <yaoxiachromium.org>
Cr-Commit-Position: refs/heads/main{#1403952}

--

wpt-commits: 7d409e8d192247cc8131665c486977213b925257
wpt-pr: 49976

UltraBlame original commit: 3a359b9243066e47f2bbe59b772e85fd2f96ed7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants