No bug, fix merge bustage in GMPProvider.jsm, a=me
authorPhil Ringnalda <philringnalda@gmail.com>
Sat, 23 May 2015 17:09:45 -0700
changeset 245392 d44425c6730c6824590c9e441479df03cda0772a
parent 245386 8c5b614735b79f09933451f679db34214c87b09c
child 245393 262801a17a4076034f8a74162a97ed83802711e4
child 245409 ab6d99fce4366bf013c9004fcf35fee7a7bbd577
child 245424 14750a60ce786ef0c6dc32cdfd0cd6ebdddf87f5
push id60168
push userphilringnalda@gmail.com
push dateSun, 24 May 2015 01:46:05 +0000
treeherdermozilla-inbound@262801a17a40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
milestone41.0a1
first release with
nightly linux32
d44425c6730c / 41.0a1 / 20150524030234 / files
nightly linux64
d44425c6730c / 41.0a1 / 20150524030234 / files
nightly mac
d44425c6730c / 41.0a1 / 20150524030234 / files
nightly win32
d44425c6730c / 41.0a1 / 20150524030234 / files
nightly win64
d44425c6730c / 41.0a1 / 20150524030234 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
No bug, fix merge bustage in GMPProvider.jsm, a=me
toolkit/mozapps/extensions/internal/GMPProvider.jsm
--- a/toolkit/mozapps/extensions/internal/GMPProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/GMPProvider.jsm
@@ -460,35 +460,18 @@ GMPWrapper.prototype = {
   _arePluginFilesOnDisk: function () {
     let fileExists = function(aGmpPath, aFileName) {
       let f = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
       let path = OS.Path.join(aGmpPath, aFileName);
       f.initWithPath(path);
       return f.exists();
     };
 
-    // Determine the name of the GMP dynamic library; it differs on every
-    // platform. Note: we can't use Services.appInfo.OS here, as that's
-    // "XPCShell" in our tests.
-    let isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
-    let isOSX = ("nsILocalFileMac" in Ci);
-    let isLinux = ("@mozilla.org/gnome-gconf-service;1" in Cc);
-
-    let libName = "";
-    let id = this._plugin.id;
-    if (isWindows) {
-      libName = id.substring(4) + ".dll";
-    } else if (isOSX) {
-      libName = "lib" + id.substring(4) + ".dylib";
-    } else if (isLinux) {
-      libName = id.substring(4) + ".so";
-    } else {
-      this._log.info("_arePluginFilesOnDisk - unsupported platform.");
-      return false;
-    }
+    let id = this._plugin.id.substring(4);
+    let libName = AppConstants.DLL_PREFIX + id + AppConstants.DLL_SUFFIX;
 
     return fileExists(this.gmpPath, libName) &&
            fileExists(this.gmpPath, id + ".info");
   },
 
   validate: function() {
     return !this.isInstalled ||
            this._arePluginFilesOnDisk();