-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 timeout in fast/images/animated-image-mp4-crash.html #22810
Fix timeout in fast/images/animated-image-mp4-crash.html #22810
Conversation
EWS run on current version of this PR (hash 6a921b9) |
if (window.internals) | ||
internals.clearMemoryCache(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand why this resolves the timeout. Does image.decode()
not resolve its promise if the image exists in the MemoryCache and we've tried to (and failed to) decode it before? I wonder if that's actually what the spec wants. Either way, can you please explain a little in a comment here to make it clear why we're doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling internals.clearMemoryCache()
resets the animation state of the image. Because the same web process can be used to run the same test multiple times, the image will be cached for later runs. So a run may use the image after the animation has advanced. If the animation ends, the promise will be rejected. And this test expects it to be resolved, so it times out.
6a921b9
to
5bef447
Compare
https://bugs.webkit.org/show_bug.cgi?id=267571 rdar://121035201 Reviewed by Cameron McCormack. Call "internals.clearMemoryCache()" when initializing the test to reset the animation state of the image. * LayoutTests/fast/images/animated-image-mp4-crash.html: Canonical link: https://commits.webkit.org/273669@main
5bef447
to
b89b579
Compare
Committed 273669@main (b89b579): https://commits.webkit.org/273669@main Reviewed commits have been landed. Closing PR #22810 and removing active labels. |
b89b579
6a921b9