Title: [278922] trunk/Source/WebCore
Revision
278922
Author
peng.l...@apple.com
Date
2021-06-15 22:40:26 -0700 (Tue, 15 Jun 2021)

Log Message

some http/tests/ are crashing with ASSERTION FAILED: isInRoutingArbitrationForToken(token) || m_setupArbitrationOngoing
https://bugs.webkit.org/show_bug.cgi?id=226896

Reviewed by Eric Carlson.

When the `RoutingArbiter` fails to `-[beginArbitrationWithCategory:completionHandler:]`,
a token won't be added to `m_tokens`. Therefore, we should remove the assertion
in `SharedRoutingArbitrator::endRoutingArbitrationForToken()`.

* platform/audio/mac/SharedRoutingArbitrator.mm:
(WebCore::SharedRoutingArbitrator::endRoutingArbitrationForToken):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (278921 => 278922)


--- trunk/Source/WebCore/ChangeLog	2021-06-16 04:55:24 UTC (rev 278921)
+++ trunk/Source/WebCore/ChangeLog	2021-06-16 05:40:26 UTC (rev 278922)
@@ -1,3 +1,17 @@
+2021-06-15  Peng Liu  <peng.l...@apple.com>
+
+        some http/tests/ are crashing with ASSERTION FAILED: isInRoutingArbitrationForToken(token) || m_setupArbitrationOngoing
+        https://bugs.webkit.org/show_bug.cgi?id=226896
+
+        Reviewed by Eric Carlson.
+
+        When the `RoutingArbiter` fails to `-[beginArbitrationWithCategory:completionHandler:]`,
+        a token won't be added to `m_tokens`. Therefore, we should remove the assertion
+        in `SharedRoutingArbitrator::endRoutingArbitrationForToken()`.
+
+        * platform/audio/mac/SharedRoutingArbitrator.mm:
+        (WebCore::SharedRoutingArbitrator::endRoutingArbitrationForToken):
+
 2021-06-15  Alan Bujtas  <za...@apple.com>
 
         Cleanup RenderElement::RendererCreationType

Modified: trunk/Source/WebCore/platform/audio/mac/SharedRoutingArbitrator.mm (278921 => 278922)


--- trunk/Source/WebCore/platform/audio/mac/SharedRoutingArbitrator.mm	2021-06-16 04:55:24 UTC (rev 278921)
+++ trunk/Source/WebCore/platform/audio/mac/SharedRoutingArbitrator.mm	2021-06-16 05:40:26 UTC (rev 278922)
@@ -120,8 +120,8 @@
 
 void SharedRoutingArbitrator::endRoutingArbitrationForToken(const Token& token)
 {
-    ASSERT(isInRoutingArbitrationForToken(token) || m_setupArbitrationOngoing);
-    m_tokens.remove(token);
+    if (m_tokens.contains(token))
+        m_tokens.remove(token);
 
     if (!m_tokens.computesEmpty())
         return;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to