[webkit-changes] [WebKit/WebKit] 02a7dd: Workaround `[AllowShared] BufferSource`

Yusuke Suzuki noreply at github.com
Tue Dec 20 09:17:55 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 02a7ddd1949f734535c90d93a6d10eea06afcdce
      https://github.com/WebKit/WebKit/commit/02a7ddd1949f734535c90d93a6d10eea06afcdce
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-12-20 (Tue, 20 Dec 2022)

  Changed paths:
    M Source/WebCore/Modules/WebGPU/GPUQueue.idl
    M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.idl
    M Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunk.idl
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoderConfig.idl
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.idl
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestCallbackInterface.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp
    M Source/WebCore/dom/TextDecoder.idl
    M Source/WebCore/dom/TextDecoderStreamDecoder.idl

  Log Message:
  -----------
  Workaround `[AllowShared] BufferSource`
https://bugs.webkit.org/show_bug.cgi?id=249632
rdar://103543109

Reviewed by Mark Lam.

BufferSource is typedef ArrayBuffer or ArrayBufferView. However, WebCore is implementing it as one class instead
of using Variant. As a result IDL AllowShared annotation is not applied correctly to each of variant's type.
We already hit this issue in WebGL and we workaround this by using ([AllowShared] ArrayBufferView or [AllowShared] ArrayBuffer).
We should do that in all the other IDL files too.

* Source/WebCore/Modules/WebGPU/GPUQueue.idl:
* Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsEncodedVideoChunk.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoderConfig.idl:
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.idl:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
* Source/WebCore/dom/TextDecoder.idl:
* Source/WebCore/dom/TextDecoderStreamDecoder.idl:

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




More information about the webkit-changes mailing list