Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 97b07fcffda031dee15e095bd86bc35274c0f41c
      
https://github.com/WebKit/WebKit/commit/97b07fcffda031dee15e095bd86bc35274c0f41c
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-09-19 (Sat, 19 Sep 2026)

  Changed paths:
    M Source/WebCore/Modules/WebGPU/GPUQueue.cpp
    M Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.cpp
    M Source/WebCore/Modules/encryptedmedia/MediaKeyStatusMap.h
    M Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientInputs.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredentialCreationOptions.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredentialDescriptor.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredentialRequestOptions.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredentialUserEntity.idl
    M Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoderConfig.h
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoderConfig.h
    M Source/WebCore/bindings/js/BufferSource.h
    M Source/WebCore/bindings/js/JSDOMConvertBufferSource.h
    M Source/WebCore/bindings/js/JSDOMConvertUnion.h
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
    M Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
    M 
Source/WebCore/bindings/scripts/test/JS/TestObj.inspector-native-function-parameters.json
    M Source/WebCore/bindings/scripts/test/TestObj.idl
    M Source/WebCore/dom/TextDecoder.cpp
    M Source/WebCore/dom/TextDecoder.h
    M Source/WebCore/dom/TextDecoderStreamDecoder.cpp
    M Source/WebCore/dom/TextDecoderStreamDecoder.h
    M Source/WebCore/html/canvas/WebGL2RenderingContext.idl
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
    M Source/WebCore/inspector/InspectorCanvasArguments.cpp
    M Source/WebCore/inspector/InspectorCanvasArguments.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm

  Log Message:
  -----------
  Generate IDLBufferSource for BufferSource
https://bugs.webkit.org/show_bug.cgi?id=307973
rdar://170959218

Reviewed by Sam Weinig.

BufferSource in IDL expanded to IDLUnion<IDLArrayBufferView, IDLArrayBuffer>, so
bindings produced a Variant that only became a BufferSource through an implicit
conversion at the call boundary. Implementations that needed to store one had to
spell BufferSource::VariantType instead, and BufferSource had to hand out its
variant for them to switch over.

GetBaseIDLType() now returns IDLBufferSource for that union, and
IDLAllowSharedAdaptor<IDLBufferSource> for [AllowShared] BufferSource, which is
what WebCodecs, WebGPU, and TextDecoder already write.

Conversion back to JS now wraps in the realm the bindings pass rather than in 
the
lexical global object. JSConverter<IDLBufferSource> discarded that realm because
[OverrideIDLType] meant none was ever passed to it, and dropping the annotation
means every call site supplies one. Iterating a MediaKeyStatusMap cross-realm
returned keys from the caller's realm and now returns them from the map's. That 
is
the only place the two can differ, since no IDL returns a BufferSource from an
attribute or operation and the dictionaries reach JS through promise resolution.

Nothing changes for content now that IDLBufferSource disallows shared buffers.
The IDLAllowSharedAdaptor<IDLUnion<...>> converters this replaces are 
unreachable
and removed, as is the [OverrideIDLType=IDLBufferSource] the WebAuthn 
dictionaries
used to name the type by hand.

BufferSource trades variant() for switchOn(), matching CSSPrimitiveValue and the
other wrappers around a Variant member. WebGL's unused BufferDataSource typedefs
go too, along with a FIXME this change makes false.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to