Title: [287646] trunk/Source/WebKit
Revision
287646
Author
you...@apple.com
Date
2022-01-05 12:08:29 -0800 (Wed, 05 Jan 2022)

Log Message

NetworkRTCProvider::attributedBundleIdentifierFromPageIdentifier should check for m_connection
https://bugs.webkit.org/show_bug.cgi?id=234845
<rdar://82120356>

Reviewed by Eric Carlson.

NetworkRTCProvider may call attributedBundleIdentifierFromPageIdentifier in a background thread,
which will then hop to main thread to get its session.
NetworkRTCProvider might have been closed when getting to main thread so we need to check m_connection.

* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::attributedBundleIdentifierFromPageIdentifier):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (287645 => 287646)


--- trunk/Source/WebKit/ChangeLog	2022-01-05 19:59:27 UTC (rev 287645)
+++ trunk/Source/WebKit/ChangeLog	2022-01-05 20:08:29 UTC (rev 287646)
@@ -1,3 +1,18 @@
+2022-01-05  Youenn Fablet  <you...@apple.com>
+
+        NetworkRTCProvider::attributedBundleIdentifierFromPageIdentifier should check for m_connection
+        https://bugs.webkit.org/show_bug.cgi?id=234845
+        <rdar://82120356>
+
+        Reviewed by Eric Carlson.
+
+        NetworkRTCProvider may call attributedBundleIdentifierFromPageIdentifier in a background thread,
+        which will then hop to main thread to get its session.
+        NetworkRTCProvider might have been closed when getting to main thread so we need to check m_connection. 
+
+        * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
+        (WebKit::NetworkRTCProvider::attributedBundleIdentifierFromPageIdentifier):
+
 2022-01-05  Tim Horton  <timothy_hor...@apple.com>
 
         Momentum Event Dispatcher: Momentum tails may get truncated if the duration runs longer than the system's

Modified: trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp (287645 => 287646)


--- trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp	2022-01-05 19:59:27 UTC (rev 287645)
+++ trunk/Source/WebKit/NetworkProcess/webrtc/NetworkRTCProvider.cpp	2022-01-05 20:08:29 UTC (rev 287646)
@@ -153,7 +153,7 @@
     return m_attributedBundleIdentifiers.ensure(pageIdentifier, [&]() -> String {
         String value;
         callOnMainRunLoopAndWait([&] {
-            auto* session = m_connection->networkSession();
+            auto* session = m_connection ? m_connection->networkSession() : nullptr;
             if (session)
                 value = session->attributedBundleIdentifierFromPageIdentifier(pageIdentifier).isolatedCopy();
         });
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to