Title: [92936] branches/safari-534.51-branch/Source/WebKit2

Diff

Modified: branches/safari-534.51-branch/Source/WebKit2/ChangeLog (92935 => 92936)


--- branches/safari-534.51-branch/Source/WebKit2/ChangeLog	2011-08-12 06:01:29 UTC (rev 92935)
+++ branches/safari-534.51-branch/Source/WebKit2/ChangeLog	2011-08-12 06:04:19 UTC (rev 92936)
@@ -1,5 +1,23 @@
 2011-08-11  Lucas Forschler  <[email protected]>
 
+    Merged 91793
+
+    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-08-11  Lucas Forschler  <[email protected]>
+
     Merged 91100
 
     2011-07-15  Dan Bernstein  <[email protected]>

Modified: branches/safari-534.51-branch/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (92935 => 92936)


--- branches/safari-534.51-branch/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm	2011-08-12 06:01:29 UTC (rev 92935)
+++ branches/safari-534.51-branch/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm	2011-08-12 06:04:19 UTC (rev 92936)
@@ -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: branches/safari-534.51-branch/Source/WebKit2/Shared/Plugins/PluginQuirks.h (92935 => 92936)


--- branches/safari-534.51-branch/Source/WebKit2/Shared/Plugins/PluginQuirks.h	2011-08-12 06:01:29 UTC (rev 92935)
+++ branches/safari-534.51-branch/Source/WebKit2/Shared/Plugins/PluginQuirks.h	2011-08-12 06:04:19 UTC (rev 92936)
@@ -63,6 +63,11 @@
         // Versions of Silverlight prior to 4 never retained the returned NPObject.
         ReturnsNonRetainedScriptableNPObject,
 
+        // 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: branches/safari-534.51-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (92935 => 92936)


--- branches/safari-534.51-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2011-08-12 06:01:29 UTC (rev 92935)
+++ branches/safari-534.51-branch/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp	2011-08-12 06:04:19 UTC (rev 92936)
@@ -144,8 +144,15 @@
 #endif
 
     if (m_userAgent.isNull()) {
-        m_userAgent = m_pluginController->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

Reply via email to