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

Restrict handle getter visibility to dedicated worker #317

Conversation

wolenetz
Copy link
Member

@wolenetz wolenetz commented Sep 20, 2022

Removes the MediaSource handle attribute visibility from the main Window context, leaving it visible only in dedicated worker contexts. Also removes the conditional throwing of NotSupportedError exceptions on getting this attribute's value if the implementation doesn't support that.

Overall, this change is to undo the backwards incompatibility issue found when older versions of MSE web app libraries enumerated main thread MediaSource attribute values, hitting exception in the Chromium feature implementation through milestone 107. This change replaces that with simpler and safer visibility restriction of this getter to just the context where it must be supported if the implementation supports MSE-in-Workers.

Note, this change replaces the alternative fix discussed in w3c/media-source PR #316.

Reference feature tracking spec issue for MSE-in-Workers w3c/media-source issue #175.


Preview | Diff

Removes the MediaSource handle attribute visibility from the main Window
context, leaving it visible only in dedicated worker contexts. Also
removes the conditional throwing of NotSupportedError exceptions on
getting this attribute's value if the implementation doesn't support
that.

Overall, this change is to undo the backwards incompatibility issue
found when older versions of MSE web app libraries enumerated main
thread MediaSource attribute values, hitting exception in the Chromium
feature implementation through milestone 107. This change replaces that
with simpler and safer visibility restriction of this getter to just the
context where it must be supported if the implementation supports
MSE-in-Workers.

Note, this change replaces the alternative fix discussed in
w3c/media-source PR w3c#316.
@wolenetz
Copy link
Member Author

@karlt @jernoble @jan-ivar @mwatson2 - please take a look.
I intend to update the Chromium MSE-in-Workers implementation ASAP to behave per this PR's adjusted behavior. Thank you for your previous comments on the discussion of alternatives in #316 and in the recent Media Working Group meeting at TPAC (https://www.w3.org/2022/09/16-mediawg-minutes.html#t10).

@wolenetz wolenetz added this to the V2 milestone Sep 20, 2022
Copy link

@karlt karlt left a comment

Choose a reason for hiding this comment

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

LGTM thanks.

@wolenetz
Copy link
Member Author

@mwatson2 if you have any comment on this, please file a spec issue or otherwise get my attention. I'm going to land this today, as it has obtained one reviewer approval and is intended to match the discussion so far on #316 and at last Friday's TPAC Media WG meeting.

@wolenetz wolenetz merged commit 898e0c1 into w3c:main Sep 21, 2022
@wolenetz wolenetz deleted the change-unsupported-handle-getter-to-be-not-exposed--no-excpetion branch September 21, 2022 19:29
github-actions bot added a commit that referenced this pull request Sep 21, 2022
SHA: 898e0c1
Reason: push, by @wolenetz

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 27, 2022
…icted

This undoes the previous launch revert commit 887a8c4e3d5203b0528e7c911b24be3aa67d2b4e, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 1, 2022
…icted

This undoes the previous launch revert commit 887a8c4e3d5203b0528e7c911b24be3aa67d2b4e, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910706
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Will Cassella <cassew@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053854}
aarongable pushed a commit to chromium/chromium that referenced this pull request Oct 1, 2022
…icted

This undoes the previous launch revert commit 887a8c4, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910706
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Will Cassella <cassew@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053854}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 1, 2022
…icted

This undoes the previous launch revert commit 887a8c4e3d5203b0528e7c911b24be3aa67d2b4e, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910706
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Will Cassella <cassew@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053854}
@wolenetz wolenetz mentioned this pull request Oct 3, 2022
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
…icted

This undoes the previous launch revert commit 887a8c4e3d5203b0528e7c911b24be3aa67d2b4e, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910706
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Will Cassella <cassew@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053854}
NOKEYCHECK=True
GitOrigin-RevId: f0a6df51caab2aec1ad24e6e638e84d922a60550
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 21, 2022
…s and handle visibility restricted, a=testonly

Automatic update from web-platform-tests
MSE-in-Workers: Relaunch with flag guards and handle visibility restricted

This undoes the previous launch revert commit 887a8c4e3d5203b0528e7c911b24be3aa67d2b4e, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910706
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Will Cassella <cassew@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053854}

--

wpt-commits: 2108f20a92a4073b8a16d00899e976ac3dc48673
wpt-pr: 36117
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Oct 26, 2022
…s and handle visibility restricted, a=testonly

Automatic update from web-platform-tests
MSE-in-Workers: Relaunch with flag guards and handle visibility restricted

This undoes the previous launch revert commit 887a8c4e3d5203b0528e7c911b24be3aa67d2b4e, and includes multiple fixes.

Switches the two RuntimeEnabled features that enable MSE-in-Workers
from experimental to stable status:
  MediaSourceInWorkers: Basic support, still using legacy object
    URLs for attachment
  MediaSourceInWorkersUsingHandle: Upgraded to match updated MSE spec, final PR linked below.

Updates the stable webexposed expectations for both the Main/Window
context and the DedicatedWorker context.

MSE spec PRs with handle usage refinements:
  * w3c/media-source#306
  * this relaunch also includes implementation of spec fix from
    w3c/media-source#317

Intent-to-ship=https://groups.google.com/a/chromium.org/g/blink-dev/c/FRY3F1v6Two

Versus the original launch, this relaunch:
* adds base::Feature (aka flag-guards) for each of the two
  RuntimeEnabledFeatures, above (with same feature name strings).
  This is to comply with mandatory flag-guarding PSA process update,
  and is meant to mitigate possible binary respins in the event this
  feature pair yet again needs to be disabled.
* updates the MediaSource.handle attribute getter to fix the
  regression responsible for the previous revert, complying with
  MSE spec that was fixed to prevent that regression (see PR #317
  linked above):
  * Removes NotSupportedError exception throwing logic from the
    handle attribute getter.
  * Restricts visibility of the handle attribute to only dedicated
    worker contexts (removes visibility of it from the main/Window
    context versus previous launch attempt), along with corresponding
    webexposed stable web_tests expectations matching this change.
  * Updates mediasource-worker-handle.html web_test to no longer
    expect NotSupportedError exception, nor even ability to access the
    handle attribute of a MediaSource object on the main/window
    context.

BUG=878133

Change-Id: Id34a07254b9b98e79c495429f8ed79555b0c4580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3910706
Commit-Queue: Will Cassella <cassew@chromium.org>
Reviewed-by: Mike Taylor <miketaylr@chromium.org>
Reviewed-by: Will Cassella <cassew@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1053854}

--

wpt-commits: 2108f20a92a4073b8a16d00899e976ac3dc48673
wpt-pr: 36117
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.

2 participants