Title: [295242] branches/safari-613-branch/Source/WebKit
Revision
295242
Author
[email protected]
Date
2022-06-03 16:21:49 -0700 (Fri, 03 Jun 2022)

Log Message

Revert a56ea95c510fc523f36e6f179f2e6a9763418f4e. rdar://problem/88904160

This reverts commit a56ea95c510fc523f36e6f179f2e6a9763418f4e.

Modified Paths

Diff

Modified: branches/safari-613-branch/Source/WebKit/ChangeLog (295241 => 295242)


--- branches/safari-613-branch/Source/WebKit/ChangeLog	2022-06-03 23:21:46 UTC (rev 295241)
+++ branches/safari-613-branch/Source/WebKit/ChangeLog	2022-06-03 23:21:49 UTC (rev 295242)
@@ -44,59 +44,6 @@
 
 2022-04-22  Kimmo Kinnunen  <[email protected]>
 
-        Multiple concurrency violations in LibWebRTCCodecsProxy
-        https://bugs.webkit.org/show_bug.cgi?id=236767
-        <rdar://88904160>
-
-        Reviewed by Antti Koivisto.
-
-        - ThreadMessageReceivers should not add IPC listeners in constructors,
-        as the delivery starts right away and uses the unconstructed virtual pointer.
-        - The work queue functions should not use GPUConnectionToWebProcess, as that is
-        main thread object.
-        - Locked m_encoders, m_decoders are sometimes accessed without lock.
-
-        Instead:
-        - Add the IPC listeners in initialize function.
-        - Remove the IPC listeners when GPUConnectionToWebProcess disconnects.
-        - Store the thread-safe conection, video frame object heap, process identity
-        objects as member variables.
-        - Do not lock m_encoders, m_decoders. If they are work queue instances,
-        just access them in the work queue functions. Add thread requirements
-        to the variables so that the compiler checks the access.
-        - Use IPC testing assertions when skipping incorrect messages.
-        - Use separate atomic counter (bool) to check if allowsExitUnderMemoryPressure.
-
-        No new tests, tested with existing tests and ASAN.
-
-        * GPUProcess/GPUConnectionToWebProcess.cpp:
-        (WebKit::GPUConnectionToWebProcess::~GPUConnectionToWebProcess):
-        (WebKit::GPUConnectionToWebProcess::didClose):
-        * GPUProcess/GPUConnectionToWebProcess.h:
-        * GPUProcess/webrtc/LibWebRTCCodecsProxy.h:
-        * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm:
-        (WebKit::LibWebRTCCodecsProxy::create):
-        (WebKit::LibWebRTCCodecsProxy::LibWebRTCCodecsProxy):
-        (WebKit::LibWebRTCCodecsProxy::stopListeningForIPC):
-        (WebKit::LibWebRTCCodecsProxy::initialize):
-        (WebKit::LibWebRTCCodecsProxy::dispatchToThread):
-        (WebKit::LibWebRTCCodecsProxy::createDecoderCallback):
-        (WebKit::LibWebRTCCodecsProxy::createH264Decoder):
-        (WebKit::LibWebRTCCodecsProxy::createH265Decoder):
-        (WebKit::LibWebRTCCodecsProxy::createVP9Decoder):
-        (WebKit::LibWebRTCCodecsProxy::releaseDecoder):
-        (WebKit::LibWebRTCCodecsProxy::createEncoder):
-        (WebKit::LibWebRTCCodecsProxy::releaseEncoder):
-        (WebKit::LibWebRTCCodecsProxy::initializeEncoder):
-        (WebKit::LibWebRTCCodecsProxy::findEncoder):
-        (WebKit::LibWebRTCCodecsProxy::encodeFrame):
-        (WebKit::LibWebRTCCodecsProxy::setEncodeRates):
-        (WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameSemaphore):
-        (WebKit::LibWebRTCCodecsProxy::setSharedVideoFrameMemory):
-        (WebKit::LibWebRTCCodecsProxy::allowsExitUnderMemoryPressure const):
-
-2022-04-22  Kimmo Kinnunen  <[email protected]>
-
         Thread safety analysis to assert "code is run sequentially" is not useful when code is mainly run with WorkQueues
         https://bugs.webkit.org/show_bug.cgi?id=236832
 

Modified: branches/safari-613-branch/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp (295241 => 295242)


--- branches/safari-613-branch/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp	2022-06-03 23:21:46 UTC (rev 295241)
+++ branches/safari-613-branch/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp	2022-06-03 23:21:49 UTC (rev 295242)
@@ -252,7 +252,7 @@
 
 void RemoteGraphicsContextGL::copyTextureFromMedia(WebCore::MediaPlayerIdentifier mediaPlayerIdentifier, uint32_t texture, uint32_t target, int32_t level, uint32_t internalFormat, uint32_t format, uint32_t type, bool premultiplyAlpha, bool flipY, CompletionHandler<void(bool)>&& completionHandler)
 {
-    assertIsCurrent(workQueue());
+    assertIsCurrent(m_workQueue());
 #if USE(AVFOUNDATION)
     UNUSED_VARIABLE(premultiplyAlpha);
     ASSERT_UNUSED(target, target == GraphicsContextGL::TEXTURE_2D);

Modified: branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h (295241 => 295242)


--- branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h	2022-06-03 23:21:46 UTC (rev 295241)
+++ branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h	2022-06-03 23:21:49 UTC (rev 295242)
@@ -31,7 +31,6 @@
 #include "DataReference.h"
 #include "RTCDecoderIdentifier.h"
 #include "RTCEncoderIdentifier.h"
-#include <WebCore/ProcessIdentity.h>
 #include <atomic>
 #include <wtf/ThreadAssertions.h>
 
@@ -88,10 +87,8 @@
 
     CFDictionaryRef ioSurfacePixelBufferCreationOptions(IOSurfaceRef);
 
-    Ref<IPC::Connection> m_connection;
+
     Ref<WorkQueue> m_queue;
-    const WebCore::ProcessIdentity m_resourceOwner;
-
     HashMap<RTCDecoderIdentifier, webrtc::LocalDecoder> m_decoders WTF_GUARDED_BY_LOCK(workQueue());
     HashMap<RTCEncoderIdentifier, webrtc::LocalEncoder> m_encoders WTF_GUARDED_BY_LOCK(workQueue());
     std::atomic<bool> m_hasEncodersOrDecoders { false };

Modified: branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm (295241 => 295242)


--- branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm	2022-06-03 23:21:46 UTC (rev 295241)
+++ branches/safari-613-branch/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm	2022-06-03 23:21:49 UTC (rev 295242)
@@ -37,7 +37,6 @@
 #import <WebCore/CVUtilities.h>
 #import <WebCore/LibWebRTCProvider.h>
 #import <WebCore/RemoteVideoSample.h>
-#import <WebCore/MediaSampleAVFObjC.h>
 #import <webrtc/sdk/WebKit/WebKitDecoder.h>
 #import <webrtc/sdk/WebKit/WebKitEncoder.h>
 #import <wtf/BlockPtr.h>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to