[webkit-changes] [WebKit/WebKit] 741c9b: ASAN_SEGV | JSArrayBufferView::ConstructionContext...

Jean-Yves Avenard noreply at github.com
Mon Feb 3 02:59:26 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 741c9b58c545f55d1165ec72658d0db615d28063
      https://github.com/WebKit/WebKit/commit/741c9b58c545f55d1165ec72658d0db615d28063
  Author: Jean-Yves Avenard <jya at apple.com>
  Date:   2025-02-03 (Mon, 03 Feb 2025)

  Changed paths:
    M Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp
    M Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp
    M Source/WebCore/platform/AudioDecoder.h
    M Source/WebCore/platform/VideoDecoder.h
    M Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp

  Log Message:
  -----------
  ASAN_SEGV | JSArrayBufferView::ConstructionContext::ConstructionContext; JSArrayBufferView::ConstructionContext::ConstructionContext; JSC::JSGenericTypedArrayView::create
https://bugs.webkit.org/show_bug.cgi?id=286900
rdar://143695448

Reviewed by Youenn Fablet.

Use a Vector<uint8_t> in {Audio|Video}Decoder::Config::description instead of a span<const uint8_t>
so that we don't have to keep a reference to an ArrayBufferView.
Codec's description are typically small (under 20 bytes) and we would have
ended up copying the data anyway.

Fly-by: amend comments and order of operations to more align with the specs.

No change in observable behaviour. Covered by existing tests.
* Source/WebCore/Modules/webcodecs/WebCodecsAudioDecoder.cpp:
(WebCore::createAudioDecoderConfig):
(WebCore::isValidDecoderConfig): Check that the ArrayBuffer is detached as per spec requirements.
(WebCore::WebCodecsAudioDecoder::configure):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoDecoder.cpp:
(WebCore::isValidDecoderConfig):
(WebCore::createVideoDecoderConfig):
(WebCore::WebCodecsVideoDecoder::configure):
* Source/WebCore/platform/AudioDecoder.h:
* Source/WebCore/platform/VideoDecoder.h:
* Source/WebCore/platform/audio/cocoa/AudioDecoderCocoa.cpp:
(WebCore::InternalAudioDecoderCocoa::initialize):

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



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


More information about the webkit-changes mailing list