fixed build by using new Preferences interface firefox14
authorWolfgang Rosenauer <wr@rosenauer.org>
Tue, 26 Jun 2012 23:24:29 +0200
branchfirefox14
changeset 492 c0088c242dab
parent 490 be017dcbd7af
child 494 21aea6bec3cb
fixed build by using new Preferences interface
mozilla-prefer_plugin_pref.patch
--- 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;