--- a/mozilla-prefer_plugin_pref.patch Mon Jun 25 22:09:15 2012 +0200
+++ b/mozilla-prefer_plugin_pref.patch Tue Jun 26 23:24:29 2012 +0200
@@ -4,7 +4,7 @@
diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp
--- a/dom/plugins/base/nsPluginHost.cpp
+++ b/dom/plugins/base/nsPluginHost.cpp
-@@ -1581,19 +1581,51 @@ nsPluginHost::FindPluginForType(const ch
+@@ -1581,19 +1581,47 @@ nsPluginHost::FindPluginForType(const ch
bool aCheckEnabled)
{
if (!aMimeType) {
@@ -13,16 +13,12 @@
LoadPlugins();
-+ nsresult res;
-+ nsCOMPtr<nsIPrefBranch> prefB (do_QueryInterface(mPrefService));
-+
+ char *preferredPluginPath = NULL;
+ nsCAutoString mimetypePrefString ("modules.plugins.mimetype.");
+ mimetypePrefString.Append(aMimeType);
+ const char *mimetypePrefChar = mimetypePrefString.get();
-+ res = prefB->GetCharPref(mimetypePrefChar, &preferredPluginPath);
-+
-+ if(!NS_SUCCEEDED(res)) preferredPluginPath = NULL;
++ nsAdoptingCString pluginPath = Preferences::GetCString(mimetypePrefChar);
++ preferredPluginPath = (char*) pluginPath.get();
+
InfallibleTArray<nsPluginTag*> matchingPlugins;