Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 42d2cdbeda91de8b704599ae8305529869c5f99c
      
https://github.com/WebKit/WebKit/commit/42d2cdbeda91de8b704599ae8305529869c5f99c
  Author: Youenn Fablet <[email protected]>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.js
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp

  Log Message:
  -----------
  WPT webcodecs videoDecoder-codec-specific.https.any.html test is failing due 
to resolve promises out of an event queue task
https://bugs.webkit.org/show_bug.cgi?id=258814
rdar://111692360

Reviewed by Eric Carlson.

The WPT test change is coming from upstream and checks that the flush promise 
callbacks are executed before the error event handlers.
The implementation is correctly resolving the promises before scheduling a task 
to fire the error event.
But the promises are resolved outside of the event loop and are thus delayed to 
a loater task, and the error event fires before.
To prevent this, we are changing the way the internal decoder is calling back 
into WebCodecsVideoDecoder code.

Instead of just hoping to the right thread, we are now hoping to the right 
thread and then enqueueing a task.
We add a weakThis check there so that it is no longer necessary on each 
callback.

Covered by updated tests.

* 
LayoutTests/imported/w3c/web-platform-tests/webcodecs/videoDecoder-codec-specific.https.any.js:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::WebCodecsVideoDecoder::configure):
(WebCore::WebCodecsVideoDecoder::decode):
(WebCore::WebCodecsVideoDecoder::flush):
(WebCore::WebCodecsVideoDecoder::resetDecoder):

Canonical link: https://commits.webkit.org/265843@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to