Title: [287307] trunk/Source/WebCore
Revision
287307
Author
[email protected]
Date
2021-12-21 02:16:21 -0800 (Tue, 21 Dec 2021)

Log Message

REGRESSION (r287258): Flaky crash in WebCore::RTCRtpScriptTransformer::enqueueFrame
https://bugs.webkit.org/show_bug.cgi?id=234522
<rdar://problem/86736206>

Reviewed by Darin Adler.

Covered by tests no longer crashing.

* Modules/mediastream/RTCRtpScriptTransformer.cpp:
(WebCore::RTCRtpScriptTransformer::enqueueFrame):
Add a null check in enqueueFrame since the transformer may be cleared during the time
of hopping from webrtc frame thread to worker thread.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287306 => 287307)


--- trunk/Source/WebCore/ChangeLog	2021-12-21 10:06:10 UTC (rev 287306)
+++ trunk/Source/WebCore/ChangeLog	2021-12-21 10:16:21 UTC (rev 287307)
@@ -1,3 +1,18 @@
+2021-12-21  Youenn Fablet  <[email protected]>
+
+        REGRESSION (r287258): Flaky crash in WebCore::RTCRtpScriptTransformer::enqueueFrame
+        https://bugs.webkit.org/show_bug.cgi?id=234522
+        <rdar://problem/86736206>
+
+        Reviewed by Darin Adler.
+
+        Covered by tests no longer crashing.
+
+        * Modules/mediastream/RTCRtpScriptTransformer.cpp:
+        (WebCore::RTCRtpScriptTransformer::enqueueFrame):
+        Add a null check in enqueueFrame since the transformer may be cleared during the time
+        of hopping from webrtc frame thread to worker thread.
+
 2021-12-21  Yoshiaki Jitsukawa  <[email protected]>
 
         [LCMS] Use std::unqiue_ptr to retain LCMS objects

Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.cpp (287306 => 287307)


--- trunk/Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.cpp	2021-12-21 10:06:10 UTC (rev 287306)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpScriptTransformer.cpp	2021-12-21 10:16:21 UTC (rev 287307)
@@ -142,6 +142,9 @@
 
 void RTCRtpScriptTransformer::enqueueFrame(ScriptExecutionContext& context, Ref<RTCRtpTransformableFrame>&& frame)
 {
+    if (!m_backend)
+        return;
+
     auto* globalObject = JSC::jsCast<JSDOMGlobalObject*>(context.globalObject());
     if (!globalObject)
         return;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to