Bug 810810 - Add support for 'APluginsDL' to the xpcshell directory service provider and return the GRE folder when queried. r=bsmedberg, glandium
authorJim Mathies <jmathies@mozilla.com>
Sat, 17 Nov 2012 14:35:16 -0600
changeset 113624 ee74c1c99707cba7ef641e827d3b55f8be44d887
parent 113623 be255a7ccfdfa30df35a4a59c13f388eb512c727
child 113625 e4cd4714357d9adbc53a05eb02bcf1bac03d1114
push id18268
push userjmathies@mozilla.com
push dateSat, 17 Nov 2012 20:35:41 +0000
treeherdermozilla-inbound@e4cd4714357d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, glandium
bugs810810
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 810810 - Add support for 'APluginsDL' to the xpcshell directory service provider and return the GRE folder when queried. r=bsmedberg, glandium
js/xpconnect/shell/xpcshell.cpp
--- a/js/xpconnect/shell/xpcshell.cpp
+++ b/js/xpconnect/shell/xpcshell.cpp
@@ -2074,11 +2074,18 @@ XPCShellDirProvider::GetFiles(const char
         if (NS_FAILED(NS_GetSpecialDirectory(NS_XPCOM_CURRENT_PROCESS_DIR,
                                              getter_AddRefs(file))) ||
             NS_FAILED(file->AppendNative(NS_LITERAL_CSTRING("defaults"))) ||
             NS_FAILED(file->AppendNative(NS_LITERAL_CSTRING("preferences"))))
             return NS_ERROR_FAILURE;
 
         dirs.AppendObject(file);
         return NS_NewArrayEnumerator(result, dirs);
+    } else if (!strcmp(prop, NS_APP_PLUGINS_DIR_LIST)) {
+        nsCOMPtr<nsIFile> file;
+        mGREDir->Clone(getter_AddRefs(file));
+        file->AppendNative(NS_LITERAL_CSTRING("plugins"));
+        nsCOMArray<nsIFile> dirs;
+        dirs.AppendObject(file);
+        return NS_NewArrayEnumerator(result, dirs);
     }
     return NS_ERROR_FAILURE;
 }