summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 23:33:13 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-19 23:33:13 +0000
commit3e24622628f9b80010c3784b7ee615c25236fc7f (patch)
tree4da8b15c4e8e012abaa553be00849a968ae2dc8e /webkit/glue
parentf2ba4e66c27fe30a9575db9816458fb497bd6f29 (diff)
downloadchromium_src-3e24622628f9b80010c3784b7ee615c25236fc7f.zip
chromium_src-3e24622628f9b80010c3784b7ee615c25236fc7f.tar.gz
chromium_src-3e24622628f9b80010c3784b7ee615c25236fc7f.tar.bz2
Fixes a crash in the Windows media player plugin caused when the Real player recorder
plugin is installed on the machine. This plugin intercepts LoadLibrary calls issued by chrome.dll and wraps NPAPI calls provided the actual plugin dll, in this case media player. This is to provide the Download this video functionality. Crash occurs probably due to an interacton with Real player and media player. Fix is to load the plugin dynamically via the exported kernel32 function LoadLibrary instead of invoking it via the LoadLibrary import from chrome.dll. This would bypass the recorder plugin. Fixes bug http://code.google.com/p/chromium/issues/detail?id=63552 Bug=63552 Test=Install real player and media player on the machine and navigate to the url mentioned in the bug. It should not crash Review URL: http://codereview.chromium.org/5190005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/plugins/plugin_lib.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/glue/plugins/plugin_lib.cc
index 292cd63..4ae4da4 100644
--- a/webkit/glue/plugins/plugin_lib.cc
+++ b/webkit/glue/plugins/plugin_lib.cc
@@ -165,7 +165,22 @@ bool PluginLib::Load() {
base::NativeLibrary library = 0;
if (!internal_) {
+#if defined(OS_WIN)
+ // This is to work around a bug in the Real player recorder plugin which
+ // intercepts LoadLibrary calls from chrome.dll and wraps NPAPI functions
+ // provided by the plugin. It crashes if the media player plugin is being
+ // loaded. Workaround is to load the dll dynamically by getting the
+ // LoadLibrary API address from kernel32.dll which bypasses the recorder
+ // plugin.
+ if (web_plugin_info_.name.find(L"Windows Media Player") !=
+ std::wstring::npos) {
+ library = base::LoadNativeLibraryDynamically(web_plugin_info_.path);
+ } else {
+ library = base::LoadNativeLibrary(web_plugin_info_.path);
+ }
+#else // OS_WIN
library = base::LoadNativeLibrary(web_plugin_info_.path);
+#endif // OS_WIN
if (library == 0) {
LOG_IF(ERROR, PluginList::DebugPluginLoading())
<< "Couldn't load plugin " << web_plugin_info_.path.value();