Title: [218570] releases/WebKitGTK/webkit-2.16/Source/WebKit2
Revision
218570
Author
[email protected]
Date
2017-06-20 01:41:13 -0700 (Tue, 20 Jun 2017)

Log Message

Merge r217914 - Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083

Reviewed by Chris Dumez.

Added a null pointer check. The content document may have went away by the time we get there from IPC.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getAuthenticationInfo):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog (218569 => 218570)


--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog	2017-06-20 08:34:43 UTC (rev 218569)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/ChangeLog	2017-06-20 08:41:13 UTC (rev 218570)
@@ -1,3 +1,15 @@
+2017-06-07  Ryosuke Niwa  <[email protected]>
+
+        Crash inside WebKit::PluginView::getAuthenticationInfo
+        https://bugs.webkit.org/show_bug.cgi?id=173083
+
+        Reviewed by Chris Dumez.
+
+        Added a null pointer check. The content document may have went away by the time we get there from IPC.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::PluginView::getAuthenticationInfo):
+
 2017-06-05  Chris Dumez  <[email protected]>
 
         ASSERTION FAILED: RunLoop::isMain() in com.apple.WebKit: IPC::Connection::sendSyncMessage + 128

Modified: releases/WebKitGTK/webkit-2.16/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (218569 => 218570)


--- releases/WebKitGTK/webkit-2.16/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2017-06-20 08:34:43 UTC (rev 218569)
+++ releases/WebKitGTK/webkit-2.16/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2017-06-20 08:41:13 UTC (rev 218570)
@@ -1593,7 +1593,11 @@
 
 bool PluginView::getAuthenticationInfo(const ProtectionSpace& protectionSpace, String& username, String& password)
 {
-    String partitionName = m_pluginElement->contentDocument()->topDocument().securityOrigin().domainForCachePartition();
+    RefPtr<Document> contentDocument = m_pluginElement->contentDocument();
+    if (!contentDocument)
+        return false;
+
+    String partitionName = contentDocument->topDocument().securityOrigin().domainForCachePartition();
     Credential credential = CredentialStorage::defaultCredentialStorage().get(partitionName, protectionSpace);
     if (credential.isEmpty())
         credential = CredentialStorage::defaultCredentialStorage().getFromPersistentStorage(protectionSpace);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to