Title: [174507] trunk/Source/WebKit2
- Revision
- 174507
- Author
- [email protected]
- Date
- 2014-10-09 09:58:48 -0700 (Thu, 09 Oct 2014)
Log Message
[X11] Plugin process crashes in NetscapePlugin::platformPostInitialize()
https://bugs.webkit.org/show_bug.cgi?id=137426
Reviewed by Darin Adler.
For some reason flash crashes when NPP_GetValue is called with
NPPVpluginCancelSrcStream, but only in windowed mode. Not calling
NPP_GetValue and unconditionally loading the source URL in the
browser fixes the crash and plugins work normally. We can handle
this particular case with a new quirk.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks): Add
DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin.
* Shared/Plugins/PluginQuirks.h: Add
DoNotCancelSrcStreamInWindowedMode quirk.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin
is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (174506 => 174507)
--- trunk/Source/WebKit2/ChangeLog 2014-10-09 16:45:32 UTC (rev 174506)
+++ trunk/Source/WebKit2/ChangeLog 2014-10-09 16:58:48 UTC (rev 174507)
@@ -1,3 +1,25 @@
+2014-10-09 Carlos Garcia Campos <[email protected]>
+
+ [X11] Plugin process crashes in NetscapePlugin::platformPostInitialize()
+ https://bugs.webkit.org/show_bug.cgi?id=137426
+
+ Reviewed by Darin Adler.
+
+ For some reason flash crashes when NPP_GetValue is called with
+ NPPVpluginCancelSrcStream, but only in windowed mode. Not calling
+ NPP_GetValue and unconditionally loading the source URL in the
+ browser fixes the crash and plugins work normally. We can handle
+ this particular case with a new quirk.
+
+ * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
+ (WebKit::NetscapePluginModule::determineQuirks): Add
+ DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin.
+ * Shared/Plugins/PluginQuirks.h: Add
+ DoNotCancelSrcStreamInWindowedMode quirk.
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin
+ is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present.
+
2014-10-09 Chris Dumez <[email protected]>
Use is<>() / downcast<>() for Widget subclasses
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp (174506 => 174507)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp 2014-10-09 16:45:32 UTC (rev 174506)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp 2014-10-09 16:58:48 UTC (rev 174507)
@@ -189,6 +189,7 @@
#if PLATFORM(EFL)
m_pluginQuirks.add(PluginQuirks::ForceFlashWindowlessMode);
#endif
+ m_pluginQuirks.add(PluginQuirks::DoNotCancelSrcStreamInWindowedMode);
break;
}
}
Modified: trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h (174506 => 174507)
--- trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h 2014-10-09 16:45:32 UTC (rev 174506)
+++ trunk/Source/WebKit2/Shared/Plugins/PluginQuirks.h 2014-10-09 16:58:48 UTC (rev 174507)
@@ -92,6 +92,9 @@
// Some ports don't support windowed plugins.
ForceFlashWindowlessMode,
+ // Flash crashes when NPP_GetValue is called for NPPVpluginCancelSrcStream in windowed mode.
+ DoNotCancelSrcStreamInWindowedMode,
+
// Windows specific quirks:
#elif PLUGIN_ARCHITECTURE(WIN)
// Whether NPN_UserAgent should always return a Mozilla user agent.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (174506 => 174507)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2014-10-09 16:45:32 UTC (rev 174506)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp 2014-10-09 16:58:48 UTC (rev 174507)
@@ -507,6 +507,12 @@
bool NetscapePlugin::shouldLoadSrcURL()
{
+#if PLUGIN_ARCHITECTURE(X11)
+ // Flash crashes when NPP_GetValue is called for NPPVpluginCancelSrcStream in windowed mode.
+ if (m_isWindowed && m_pluginModule->pluginQuirks().contains(PluginQuirks::DoNotCancelSrcStreamInWindowedMode))
+ return true;
+#endif
+
// Check if we should cancel the load
NPBool cancelSrcStream = false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes