Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e0c8e30ad2f1f8915549b6746fc43fa9c7f5a87
      
https://github.com/WebKit/WebKit/commit/6e0c8e30ad2f1f8915549b6746fc43fa9c7f5a87
  Author: Sam Weinig <[email protected]>
  Date:   2026-01-31 (Sat, 31 Jan 2026)

  Changed paths:
    M Source/JavaScriptCore/API/JSTypedArray.cpp
    M Source/JavaScriptCore/runtime/JSArrayBuffer.cpp
    M Source/JavaScriptCore/runtime/JSArrayBufferView.cpp
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
    M Source/JavaScriptCore/runtime/SimpleTypedArrayController.cpp
    M Source/JavaScriptCore/runtime/SimpleTypedArrayController.h
    M Source/JavaScriptCore/runtime/TypedArrayAdaptersForwardDeclarations.h
    M Source/JavaScriptCore/runtime/TypedArrayController.h
    M Source/WebCore/Modules/compression/CompressionStreamEncoder.idl
    M Source/WebCore/Modules/compression/DecompressionStreamDecoder.idl
    M Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl
    M 
Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl
    M Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl
    M Source/WebCore/Modules/mediastream/RTCEncodedFrame.cpp
    M Source/WebCore/Modules/mediastream/RTCEncodedFrame.h
    M Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp
    M Source/WebCore/Modules/push-api/PushMessageData.idl
    M Source/WebCore/Modules/webauthn/AuthenticationExtensionsClientOutputs.h
    M Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.idl
    M Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp
    M Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h
    M Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.idl
    M Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp
    M Source/WebCore/Modules/webauthn/AuthenticatorResponse.h
    M Source/WebCore/Modules/webauthn/AuthenticatorResponse.idl
    M Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp
    M Source/WebCore/Modules/webauthn/PublicKeyCredential.h
    M Source/WebCore/Modules/webauthn/fido/DeviceResponseConverter.cpp
    M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
    M Source/WebCore/bindings/IDLTypes.h
    M Source/WebCore/bindings/js/JSDOMConvertBufferSource.h
    M Source/WebCore/bindings/js/JSDOMConvertUnion.h
    M Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp
    M Source/WebCore/bindings/js/SerializedScriptValue.cpp
    M Source/WebCore/bindings/js/StructuredClone.cpp
    M Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp
    M Source/WebCore/bindings/js/WebCoreTypedArrayController.h
    M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
    M Source/WebCore/dom/TextEncoder.idl
    M Source/WebCore/dom/TextEncoderStreamEncoder.idl
    M Source/WebCore/fileapi/FileReaderSync.idl
    M Source/WebCore/html/track/DataCue.cpp
    M Source/WebCore/html/track/DataCue.h
    M Source/WebCore/html/track/DataCue.idl
    M Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
    M 
Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm
    M Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp

  Log Message:
  -----------
  Make buffer source toJS() conversions require correct nullness and subtyping
https://bugs.webkit.org/show_bug.cgi?id=306536

Reviewed by Anne van Kesteren.

Following on from https://bugs.webkit.org/show_bug.cgi?id=305413, which handled
IDL interfaces, this makes IDL buffer source toJS() conversions require correct
nullness and subtyping.

As with IDL interfaces, IDL files now need to be annotated accurately, so a 
number
of places where non-nullable buffer source types were used have been nullable 
with
a corresponding FIXME. Places where making the implementation non-null was 
trivial
have been fixed as well.

To keep dictionaries with buffer source types working, the 
`LegacyNativeDictionaryRequiredInterfaceNullability`
extended attribute has been extended to also work for buffer sources. (I have 
kept
the name the same to reduce churn, since it is expected that the attribute will 
be
relatively short lived. If that turns out not to be the case, we can rename it 
at
a later point.)

To keep unions with buffer source types working, the union converter type 
adjuster
for interfaces, `AddNullableIfInterface`, has been updated to support buffer 
source
types and renamed to `AddNullableIfInterfaceOrArrayBufferSource`.

To fix a number of the new FIXMEs, we will likely need a strategy for dealing 
with
the frequent use of failable create functions for the buffer source types (e.g
`tryCreate...()`), likely by throwing exceptions in more cases.

* Source/JavaScriptCore/API/JSTypedArray.cpp:
* Source/JavaScriptCore/runtime/JSArrayBuffer.cpp:
* Source/JavaScriptCore/runtime/JSArrayBufferView.cpp:
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
* Source/JavaScriptCore/runtime/SimpleTypedArrayController.cpp:
* Source/JavaScriptCore/runtime/SimpleTypedArrayController.h:
* Source/JavaScriptCore/runtime/TypedArrayAdaptersForwardDeclarations.h:
* Source/JavaScriptCore/runtime/TypedArrayController.h:
* Source/WebCore/Modules/compression/CompressionStreamEncoder.idl:
* Source/WebCore/Modules/compression/DecompressionStreamDecoder.idl:
* Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl:
* Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl:
* Source/WebCore/Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl:
* Source/WebCore/Modules/mediastream/RTCEncodedFrame.cpp:
* Source/WebCore/Modules/mediastream/RTCEncodedFrame.h:
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp:
* Source/WebCore/Modules/push-api/PushMessageData.idl:
* Source/WebCore/Modules/webauthn/AuthenticatorAssertionResponse.idl:
* Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.cpp:
* Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.h:
* Source/WebCore/Modules/webauthn/AuthenticatorAttestationResponse.idl:
* Source/WebCore/Modules/webauthn/AuthenticatorResponse.h:
* Source/WebCore/Modules/webauthn/AuthenticatorResponse.idl:
* Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp:
* Source/WebCore/Modules/webauthn/PublicKeyCredential.h:
* Source/WebCore/bindings/IDLTypes.h:
* Source/WebCore/bindings/js/JSDOMConvertBufferSource.h:
* Source/WebCore/bindings/js/JSDOMConvertUnion.h:
* Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
* Source/WebCore/bindings/js/StructuredClone.cpp:
* Source/WebCore/bindings/js/WebCoreTypedArrayController.cpp:
* Source/WebCore/bindings/js/WebCoreTypedArrayController.h:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
* Source/WebCore/dom/TextEncoder.idl:
* Source/WebCore/dom/TextEncoderStreamEncoder.idl:
* Source/WebCore/fileapi/FileReaderSync.idl:
* Source/WebCore/html/track/DataCue.cpp:
* Source/WebCore/html/track/DataCue.h:
* Source/WebCore/html/track/DataCue.idl:
* Source/WebCore/platform/mac/SerializedPlatformDataCueMac.mm:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
* Tools/TestWebKitAPI/Tests/WebCore/CtapResponseTest.cpp:

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



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

Reply via email to