Title: [218217] trunk/Source/WebKit2
Revision
218217
Author
[email protected]
Date
2017-06-13 15:31:49 -0700 (Tue, 13 Jun 2017)

Log Message

Add API::InjectedBundle::PageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=173265

Reviewed by Alex Christensen.

Add missing null check that is causing crashes on iOS.

* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::userAgentForURL):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (218216 => 218217)


--- trunk/Source/WebKit2/ChangeLog	2017-06-13 22:31:04 UTC (rev 218216)
+++ trunk/Source/WebKit2/ChangeLog	2017-06-13 22:31:49 UTC (rev 218217)
@@ -1,3 +1,15 @@
+2017-06-13  Chris Dumez  <[email protected]>
+
+        Add API::InjectedBundle::PageLoaderClient
+        https://bugs.webkit.org/show_bug.cgi?id=173265
+
+        Reviewed by Alex Christensen.
+
+        Add missing null check that is causing crashes on iOS.
+
+        * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+        (WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
+
 2017-06-13  Brent Fulgham  <[email protected]>
 
         [WK2][macOS] Allow AppleEvents in Citrix View Plugin

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp (218216 => 218217)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp	2017-06-13 22:31:04 UTC (rev 218216)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp	2017-06-13 22:31:49 UTC (rev 218217)
@@ -359,6 +359,8 @@
     if (!m_client.userAgentForURL)
         return String();
     WKStringRef userAgent = m_client.userAgentForURL(toAPI(&frame), toAPI(API::URL::create(url).ptr()), m_client.base.clientInfo);
+    if (!userAgent)
+        return String();
     return toImpl(userAgent)->string();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to