Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8f78933a3164d21c547e2d88c91d44f1a798f46b
      
https://github.com/WebKit/WebKit/commit/8f78933a3164d21c547e2d88c91d44f1a798f46b
  Author: Geoffrey Garen <gga...@apple.com>
  Date:   2024-11-04 (Mon, 04 Nov 2024)

  Changed paths:
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivate.h
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateEncoder.cpp
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateEncoder.h
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.cpp
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateGStreamer.h
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp
    M Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.h

  Log Message:
  -----------
  Build fix for MediaRecorderPrivateEncoder in recent clang toolchains
https://bugs.webkit.org/show_bug.cgi?id=282549
rdar://139216339

Reviewed by Chris Dumez.

MediaRecorderPrivateEncoder tells the compiler "You can only use m_mimeType
inside a scope in which you assertIsMainThread()".

Recent versions of clang notice that this scope ends when a function returns,
so, in the mimeType() accessor, it is an error to return a reference to 
m_mimeType.

The simplest fix for now seems to be to return String instead of String&.

Latern on, maybe we can annotate the accessor in a way that shows the compiler
that assertIsMainThread() continues to be true after we return.

* Source/WebCore/platform/mediarecorder/MediaRecorderPrivateEncoder.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to