Title: [234011] trunk/Source/WebCore
Revision
234011
Author
d...@apple.com
Date
2018-07-19 16:17:41 -0700 (Thu, 19 Jul 2018)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (234010 => 234011)


--- trunk/Source/WebCore/ChangeLog	2018-07-19 23:11:24 UTC (rev 234010)
+++ trunk/Source/WebCore/ChangeLog	2018-07-19 23:17:41 UTC (rev 234011)
@@ -1,3 +1,18 @@
+2018-07-19  Dean Jackson  <d...@apple.com>
+
+        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.
+
 2018-07-19  Antoine Quint  <grao...@apple.com>
 
         Ensure DocumentTimeline is kept alive until the VM::whenIdle callback is called

Modified: trunk/Source/WebCore/plugins/PluginData.cpp (234010 => 234011)


--- trunk/Source/WebCore/plugins/PluginData.cpp	2018-07-19 23:11:24 UTC (rev 234010)
+++ trunk/Source/WebCore/plugins/PluginData.cpp	2018-07-19 23:17:41 UTC (rev 234011)
@@ -124,6 +124,8 @@
 {
     if (!protocolHostAndPortAreEqual(m_cachedVisiblePlugins.pageURL, url))
         m_cachedVisiblePlugins = { url, m_page.pluginInfoProvider().webVisiblePluginInfo(m_page, url) };
+    if (!m_cachedVisiblePlugins.pluginList)
+        return false;
     return supportsWebVisibleMimeType(mimeType, allowedPluginTypes, *m_cachedVisiblePlugins.pluginList);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to