Title: [217914] trunk/Source/WebKit2
Revision
217914
Author
[email protected]
Date
2017-06-07 20:10:43 -0700 (Wed, 07 Jun 2017)

Log Message

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: trunk/Source/WebKit2/ChangeLog (217913 => 217914)


--- trunk/Source/WebKit2/ChangeLog	2017-06-08 00:51:11 UTC (rev 217913)
+++ trunk/Source/WebKit2/ChangeLog	2017-06-08 03:10:43 UTC (rev 217914)
@@ -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-07  Youenn Fablet  <[email protected]>
 
         getUserMedia is prompting too often

Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (217913 => 217914)


--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2017-06-08 00:51:11 UTC (rev 217913)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp	2017-06-08 03:10:43 UTC (rev 217914)
@@ -1594,7 +1594,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