Changeset 217914 in webkit


Ignore:
Timestamp:
Jun 7, 2017 8:10:43 PM (7 years ago)
Author:
rniwa@webkit.org
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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r217910 r217914  
     12017-06-07  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        Crash inside WebKit::PluginView::getAuthenticationInfo
     4        https://bugs.webkit.org/show_bug.cgi?id=173083
     5
     6        Reviewed by Chris Dumez.
     7
     8        Added a null pointer check. The content document may have went away by the time we get there from IPC.
     9
     10        * WebProcess/Plugins/PluginView.cpp:
     11        (WebKit::PluginView::getAuthenticationInfo):
     12
    1132017-06-07  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp

    r217260 r217914  
    15951595bool PluginView::getAuthenticationInfo(const ProtectionSpace& protectionSpace, String& username, String& password)
    15961596{
    1597     String partitionName = m_pluginElement->contentDocument()->topDocument().securityOrigin().domainForCachePartition();
     1597    RefPtr<Document> contentDocument = m_pluginElement->contentDocument();
     1598    if (!contentDocument)
     1599        return false;
     1600
     1601    String partitionName = contentDocument->topDocument().securityOrigin().domainForCachePartition();
    15981602    Credential credential = CredentialStorage::defaultCredentialStorage().get(partitionName, protectionSpace);
    15991603    if (credential.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.