Title: [91793] trunk/Source/WebKit2
- Revision
- 91793
- Author
- [email protected]
- Date
- 2011-07-26 15:08:28 -0700 (Tue, 26 Jul 2011)
Log Message
Apply r40940 to WebKit2 to work around a Silverlight crash.
https://bugs.webkit.org/show_bug.cgi?id=65205
<rdar://problem/9058370>
Patch by Tim Horton <[email protected]> on 2011-07-26
Reviewed by Anders Carlsson.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::determineQuirks):
* Shared/Plugins/PluginQuirks.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::userAgent):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (91792 => 91793)
--- trunk/Source/WebKit2/ChangeLog 2011-07-26 22:07:23 UTC (rev 91792)
+++ trunk/Source/WebKit2/ChangeLog 2011-07-26 22:08:28 UTC (rev 91793)
@@ -1,3 +1,17 @@
+2011-07-26 Tim Horton <[email protected]>
+
+ Apply r40940 to WebKit2 to work around a Silverlight crash.
+ https://bugs.webkit.org/show_bug.cgi?id=65205
+ <rdar://problem/9058370>
+
+ Reviewed by Anders Carlsson.
+
+ * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+ (WebKit::NetscapePluginModule::determineQuirks):
+ * Shared/Plugins/PluginQuirks.h:
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::userAgent):
+
2011-07-26 Dan Bernstein <[email protected]>
<rdar://problem/9842889> Add a generic pictograph font family
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (91792 => 91793)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2011-07-26 22:07:23 UTC (rev 91792)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm 2011-07-26 22:08:28 UTC (rev 91793)
@@ -472,6 +472,11 @@
// there's a 'background' attribute.
m_pluginQuirks.add(PluginQuirks::MakeTransparentIfBackgroundAttributeExists);
+ // Silverlight has a workaround for a leak in Safari 2. This workaround is
+ // applied when the user agent does not contain "Version/3" so we append it
+ // at the end of the user agent.
+ m_pluginQuirks.add(PluginQuirks::AppendVersion3UserAgent);
+
PluginVersion pluginVersion = PluginVersion::parse(plugin.versionString);
if (pluginVersion.isValid()) {
if (pluginVersion.isLessThan(4)) {
Modified: trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h (91792 => 91793)
--- trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h 2011-07-26 22:07:23 UTC (rev 91792)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h 2011-07-26 22:08:28 UTC (rev 91793)
@@ -69,6 +69,11 @@
// embeds its plug-in.
WantsLowercaseParameterNames,
+ // Whether to append Version/3.2.1 to the user-agent passed to the plugin
+ // This is necessary to disable Silverlight's workaround for a Safari 2 leak
+ // which is enabled if it doesn't find Version/3 in the user-agent.
+ AppendVersion3UserAgent,
+
#ifndef NP_NO_QUICKDRAW
// Allow the plug-in to use the QuickDraw drawing model, since we know that the plug-in
// will never paint or receive events. Used by the AppleConnect plug-in.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (91792 => 91793)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-07-26 22:07:23 UTC (rev 91792)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2011-07-26 22:08:28 UTC (rev 91793)
@@ -144,8 +144,15 @@
#endif
if (m_userAgent.isNull()) {
- m_userAgent = controller()->userAgent().utf8();
- ASSERT(!m_userAgent.isNull());
+ String userAgent = controller()->userAgent();
+ ASSERT(!userAgent.isNull());
+
+#if PLUGIN_ARCHITECTURE(MAC)
+ if (quirks().contains(PluginQuirks::AppendVersion3UserAgent))
+ userAgent += " Version/3.2.1";
+#endif
+
+ m_userAgent = userAgent.utf8();
}
return m_userAgent.data();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes