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

Fix flakiness in audioworklet-suspend.https.html #16368

Merged
merged 1 commit into from Apr 16, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Apr 16, 2019

It is because the actual suspension takes time to stop the render loop
completely. So the current time advances a little after the suspension
and the assertion that compares two timestamps fails.

This CL fixes the problem by:

  1. Suspend the context immediately after its creation.
  2. Cache timestamp A after the worklet module loading is completed.
  3. Check timestamp B after 500ms. If the context is not suspended
    (which is the original bug), two timestamps A and B won't match.

Bug: 953332
Test: external/wpt/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html
Change-Id: I3fc4ccf78ec9c137128f8605d502692be303b02e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570129
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651437}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

Already reviewed downstream.

It is because the actual suspension takes time to stop the render loop
completely. So the current time advances a little after the suspension
and the assertion that compares two timestamps fails.

This CL fixes the problem by:
1. Suspend the context immediately after its creation.
2. Cache timestamp A after the worklet module loading is completed.
3. Check timestamp B after 500ms. If the context is not suspended
   (which is the original bug), two timestamps A and B won't match.

Bug: 953332
Test: external/wpt/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-suspend.https.html
Change-Id: I3fc4ccf78ec9c137128f8605d502692be303b02e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570129
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Robert Ma <robertma@chromium.org>
Commit-Queue: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651437}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants