Title: [259775] trunk/Source/WebKit
Revision
259775
Author
[email protected]
Date
2020-04-08 18:37:30 -0700 (Wed, 08 Apr 2020)

Log Message

UserMediaCaptureManagerProxy::clone should validate its parameters
<https://webkit.org/b/210221>
<rdar://problem/61063019>

Reviewed by Alex Christensen.

* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(MESSAGE_CHECK): Define (and undef) new macro for assertion.
(WebKit::UserMediaCaptureManagerProxy::clone): Change ASSERT()
to MESSAGE_CHECK().

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (259774 => 259775)


--- trunk/Source/WebKit/ChangeLog	2020-04-09 01:10:13 UTC (rev 259774)
+++ trunk/Source/WebKit/ChangeLog	2020-04-09 01:37:30 UTC (rev 259775)
@@ -1,5 +1,18 @@
 2020-04-08  David Kilzer  <[email protected]>
 
+        UserMediaCaptureManagerProxy::clone should validate its parameters
+        <https://webkit.org/b/210221>
+        <rdar://problem/61063019>
+
+        Reviewed by Alex Christensen.
+
+        * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
+        (MESSAGE_CHECK): Define (and undef) new macro for assertion.
+        (WebKit::UserMediaCaptureManagerProxy::clone): Change ASSERT()
+        to MESSAGE_CHECK().
+
+2020-04-08  David Kilzer  <[email protected]>
+
         WebKit::ShareableBitmap::Handle::decode() should validate m_size instance variables
         <https://webkit.org/b/210211>
         <rdar://problem/60543986>

Modified: trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp (259774 => 259775)


--- trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp	2020-04-09 01:10:13 UTC (rev 259774)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp	2020-04-09 01:37:30 UTC (rev 259775)
@@ -28,6 +28,7 @@
 
 #if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM)
 
+#include "Connection.h"
 #include "SharedRingBufferStorage.h"
 #include "UserMediaCaptureManagerMessages.h"
 #include "UserMediaCaptureManagerProxyMessages.h"
@@ -42,6 +43,8 @@
 #include <WebCore/WebAudioBufferList.h>
 #include <wtf/UniqueRef.h>
 
+#define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, &m_connectionProxy->connection())
+
 namespace WebKit {
 using namespace WebCore;
 
@@ -294,8 +297,8 @@
 
 void UserMediaCaptureManagerProxy::clone(RealtimeMediaSourceIdentifier clonedID, RealtimeMediaSourceIdentifier newSourceID)
 {
-    ASSERT(m_proxies.contains(clonedID));
-    ASSERT(!m_proxies.contains(newSourceID));
+    MESSAGE_CHECK(m_proxies.contains(clonedID));
+    MESSAGE_CHECK(!m_proxies.contains(newSourceID));
     if (auto* proxy = m_proxies.get(clonedID))
         m_proxies.add(newSourceID, makeUnique<SourceProxy>(newSourceID, m_connectionProxy->connection(), proxy->source().clone()));
 }
@@ -324,4 +327,6 @@
 
 }
 
+#undef MESSAGE_CHECK
+
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to