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

Add WakeLockSentinel.released. #279

Merged
merged 2 commits into from
Aug 28, 2020
Merged

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Aug 25, 2020

released is a read-only boolean attribute that indicates whether a
WakeLockSentinel has been released. Its initial value is false, and it is
changed to true by the "release a wake lock" algorithm.

Fixes #272.

The following tasks have been completed:

Implementation commitment:


Preview | Diff

@rakuco
Copy link
Member Author

rakuco commented Aug 25, 2020

Please take a look -- I'll file bugs, send PRs and update links in the PR description once someone checks if this is the right approach. The PR is so small that I feel I'm missing something obvious :-)

index.html Show resolved Hide resolved
index.html Show resolved Hide resolved
`released` is a read-only boolean attribute that indicates whether a
WakeLockSentinel has been released. Its initial value is false, and it is
changed to true by the "release a wake lock" algorithm.

Fixes w3c#272.
index.html Outdated Show resolved Hide resolved
Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Just need to move when the lock is released to the actual task.

Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

Perfect! One tiny nit... could you please run tidy on the doc before merging?

@rakuco
Copy link
Member Author

rakuco commented Aug 28, 2020

One tiny nit... could you please run tidy on the doc before merging?

I already did :-) #274 fixed all existing style issues, and I always run tidy before sending new PRs.

@rakuco rakuco merged commit 0dc9cf4 into w3c:gh-pages Aug 28, 2020
@rakuco rakuco deleted the WakeLockSentinel-released branch August 28, 2020 13:32
rakuco added a commit to rakuco/wake-lock that referenced this pull request Aug 28, 2020
Adopt some post-commit suggestions posted to w3c#279:
* `WakeLockSentinel.released` is a read-only attribute, so saying "change
  its value" in the "release a wake lock" algorithm is a contradiction.
  Instead, add a `[[Released]]`` internal slot to WakeLockSentinel and
  change that instead, and change `released`'s description to mention the
  slot.
* While here, add a separate section to each WakeLockSentinel attribute.
rakuco added a commit to rakuco/wake-lock that referenced this pull request Aug 28, 2020
Adopt some post-commit suggestions posted to w3c#279:
* `WakeLockSentinel.released` is a read-only attribute, so saying "change
  its value" in the "release a wake lock" algorithm is a contradiction.
  Instead, add a `[[Released]]` internal slot to WakeLockSentinel and
  change that instead, and change `released`'s description to mention the
  slot.
* While here, add a separate section to each WakeLockSentinel attribute.
rakuco added a commit that referenced this pull request Sep 1, 2020
Adopt some post-commit suggestions posted to #279:
* `WakeLockSentinel.released` is a read-only attribute, so saying "change
  its value" in the "release a wake lock" algorithm is a contradiction.
  Instead, add a `[[Released]]` internal slot to WakeLockSentinel and
  change that instead, and change `released`'s description to mention the
  slot.
* While here, add a separate section to each WakeLockSentinel attribute.
rakuco added a commit to rakuco/wpt that referenced this pull request Sep 1, 2020
rakuco added a commit to web-platform-tests/wpt that referenced this pull request Sep 1, 2020
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Sep 7, 2020
This new attribute indicates whether a sentinel object has been released or
not. While here, move the dispatching of the "release" event to a separate
method so that we can really change |release|'s value and dispatch the event
in a separate, queued task.

Additional web tests have been sent directly to WPT in
web-platform-tests/wpt#25271.

Spec PR: w3c/screen-wake-lock#279
ChromeStatus entry: https://chromestatus.com/feature/5632527123349504
Intent to Prototype and Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/1V6Ss1VABko/m/Y3Nl0vHIAQAJ

Fixed: 1122518
Change-Id: Iff39ec3db630fa959e6c3c82b9c5ee8df93b681c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379740
Commit-Queue: Yoav Weiss <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#804729}
rakuco added a commit to rakuco/browser-compat-data that referenced this pull request Sep 15, 2020
This was added to the spec in [1], and to Blink in [2], which is present
since Chromium 87.

[1] w3c/screen-wake-lock#279
[2] https://chromium-review.googlesource.com/c/chromium/src/+/2379740
sideshowbarker pushed a commit to mdn/browser-compat-data that referenced this pull request Sep 15, 2020
This was added to the spec in [1], and to Blink in [2], which is present
since Chromium 87.

[1] w3c/screen-wake-lock#279
[2] https://chromium-review.googlesource.com/c/chromium/src/+/2379740
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
This new attribute indicates whether a sentinel object has been released or
not. While here, move the dispatching of the "release" event to a separate
method so that we can really change |release|'s value and dispatch the event
in a separate, queued task.

Additional web tests have been sent directly to WPT in
web-platform-tests/wpt#25271.

Spec PR: w3c/screen-wake-lock#279
ChromeStatus entry: https://chromestatus.com/feature/5632527123349504
Intent to Prototype and Ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/1V6Ss1VABko/m/Y3Nl0vHIAQAJ

Fixed: 1122518
Change-Id: Iff39ec3db630fa959e6c3c82b9c5ee8df93b681c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379740
Commit-Queue: Yoav Weiss <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Reviewed-by: Reilly Grant <[email protected]>
Auto-Submit: Raphael Kubo da Costa <[email protected]>
Cr-Commit-Position: refs/heads/master@{#804729}
GitOrigin-RevId: 9e71d67dff4dbd78991744fb13a6f35bb8e46719
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.

sentinel.released boolean
4 participants