Closed Bug 1859668 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42590 - [shared storage] Use separate mojom channels for worklet creation (addModule) and for other operations (selectURL/run)

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 42590 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/42590
Details from upstream follow.

Yao Xiao <yaoxia@chromium.org> wrote:

[shared storage] Use separate mojom channels for worklet creation (addModule) and for other operations (selectURL/run)

What: Currently, The mojom::SharedStorageDocumentService channel
is used to create the worklet (i.e. handle addModule), and is also
used to route future worklet operations to SharedStorageWorkletHost.
This CL decouples the two things. Note that the new channel is
still associated with mojom::SharedStorageDocumentService (which is
associated with the default navigation mojom channel), so that
worklet operations before navigating away can be handled reliably.

We also combine the handling of "creating worklet" and "addModule"
because they always occur together. By doing this, we can remove some
assertions on addModule status.

Also, move more permission checks to the renderer, and
ReportbadMessage at mojom boundary: 1) addModule can only be called
once, 2) addModule must be called before selectURL()/run(),
3) selectURL()/run() cannot be called if a previous call didn't
have {keepAlive: true}

Why: This prepares for a potential future change to allow multiple
worklets per Document. Nevertheless, a decoupled architecture is
generally better.

Bug: 1218540
Change-Id: Idc2b5df326ba75806f293d881fb9fb00fe80601e
Reviewed-on: https://chromium-review.googlesource.com/4947893
WPT-Export-Revision: fdc41343fca07b8365e363a0a1273938250b1951

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 3 tests and 16 subtests

Status Summary

Firefox

OK : 3
FAIL: 21

Chrome

OK : 3
FAIL: 21

Safari

OK : 3
FAIL: 21

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /shared-storage/run-operation.tentative.https.sub.html [wpt.fyi]
    • run(): FAIL (Chrome: FAIL, Safari: FAIL)
    • run() with custom data: FAIL (Chrome: FAIL, Safari: FAIL)
    • run() with unsupported serializable type: FAIL (Chrome: FAIL, Safari: FAIL)
  • /shared-storage/run-url-selection-operation-without-add-module.tentative.https.sub.html [wpt.fyi]
    • selectURL() without addModule, selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() without addModule, selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
  • /shared-storage/run-url-selection-operation.tentative.https.sub.html [wpt.fyi]
    • selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with urls array length too big, selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with empty urls array, selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with missing url, selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with invalid url, selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with invalid report url selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with http report url, selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with invalid reportingMetadata selectURL() resolves to config: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with urls array length too big, selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with empty urls array, selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with missing url, selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with invalid url, selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with invalid report url selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with http report url, selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
    • selectURL() with invalid reportingMetadata selectURL() resolves to urn:uuid: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a5afe779f057 [wpt PR 42590] - [shared storage] Use separate mojom channels for worklet creation (addModule) and for other operations (selectURL/run), a=testonly https://hg.mozilla.org/integration/autoland/rev/c4d27dcc66c1 [wpt PR 42590] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.