Changeset 234011 in webkit


Ignore:
Timestamp:
Jul 19, 2018 4:17:41 PM (6 years ago)
Author:
dino@apple.com
Message:

CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: std::optional<WTF::Vector<WebCore::PluginInfo, 0ul, WTF::CrashOnOverflow, 16ul> >::operator* & + 73
https://bugs.webkit.org/show_bug.cgi?id=187820
<rdar://problem/42017759>

Reviewed by Antoine Quint.

Speculative fix for this crash, which is accessing an optional without checking
if it exists. The crash logs didn't point to a reproducible test case.

  • plugins/PluginData.cpp:

(WebCore::PluginData::supportsWebVisibleMimeTypeForURL const): Return false if
the optional doesn't exist.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r234007 r234011  
     12018-07-19  Dean Jackson  <dino@apple.com>
     2
     3        CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: std::optional<WTF::Vector<WebCore::PluginInfo, 0ul, WTF::CrashOnOverflow, 16ul> >::operator* & + 73
     4        https://bugs.webkit.org/show_bug.cgi?id=187820
     5        <rdar://problem/42017759>
     6
     7        Reviewed by Antoine Quint.
     8
     9        Speculative fix for this crash, which is accessing an optional without checking
     10        if it exists. The crash logs didn't point to a reproducible test case.
     11
     12        * plugins/PluginData.cpp:
     13        (WebCore::PluginData::supportsWebVisibleMimeTypeForURL const): Return false if
     14        the optional doesn't exist.
     15
    1162018-07-19  Antoine Quint  <graouts@apple.com>
    217
  • trunk/Source/WebCore/plugins/PluginData.cpp

    r232815 r234011  
    125125    if (!protocolHostAndPortAreEqual(m_cachedVisiblePlugins.pageURL, url))
    126126        m_cachedVisiblePlugins = { url, m_page.pluginInfoProvider().webVisiblePluginInfo(m_page, url) };
     127    if (!m_cachedVisiblePlugins.pluginList)
     128        return false;
    127129    return supportsWebVisibleMimeType(mimeType, allowedPluginTypes, *m_cachedVisiblePlugins.pluginList);
    128130}
Note: See TracChangeset for help on using the changeset viewer.