Bug 1386200 - Don't use Chromium platform macros under dom/media/. r=cpearce
MozReview-Commit-ID: FyEvc5qdXEE
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -103,22 +103,20 @@ GetPluginFile(const nsAString& aPluginPa
nsCOMPtr<nsIFile>& aLibDirectory,
nsCOMPtr<nsIFile>& aLibFile)
{
nsAutoString baseName;
GetFileBase(aPluginPath, aLibDirectory, aLibFile, baseName);
#if defined(XP_MACOSX)
nsAutoString binaryName = NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".dylib");
-#elif defined(OS_POSIX)
- nsAutoString binaryName = NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".so");
#elif defined(XP_WIN)
nsAutoString binaryName = baseName + NS_LITERAL_STRING(".dll");
#else
-#error not defined
+ nsAutoString binaryName = NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".so");
#endif
aLibFile->AppendRelativePath(binaryName);
return true;
}
static bool
GetPluginFile(const nsAString& aPluginPath,
nsCOMPtr<nsIFile>& aLibFile)
--- a/dom/media/gmp/GMPProcessChild.cpp
+++ b/dom/media/gmp/GMPProcessChild.cpp
@@ -24,29 +24,27 @@ GMPProcessChild::~GMPProcessChild()
{
}
bool
GMPProcessChild::Init(int aArgc, char* aArgv[])
{
nsAutoString pluginFilename;
-#if defined(OS_POSIX)
+#if !defined(XP_WIN)
// NB: need to be very careful in ensuring that the first arg
// (after the binary name) here is indeed the plugin module path.
// Keep in sync with dom/plugins/PluginModuleParent.
std::vector<std::string> values = CommandLine::ForCurrentProcess()->argv();
MOZ_ASSERT(values.size() >= 2, "not enough args");
pluginFilename = NS_ConvertUTF8toUTF16(nsDependentCString(values[1].c_str()));
-#elif defined(OS_WIN)
+#else
std::vector<std::wstring> values = CommandLine::ForCurrentProcess()->GetLooseValues();
MOZ_ASSERT(values.size() >= 1, "not enough loose args");
pluginFilename = nsDependentString(values[0].c_str());
-#else
-#error Not implemented
#endif
BackgroundHangMonitor::Startup();
return mPlugin.Init(pluginFilename,
ParentPid(),
IOThreadChild::message_loop(),
IOThreadChild::channel());