Bug 971811 - Don't prepend an empty existing DYLD_INSERT_LIBRARIES path when launching the plugin. r=smichaud
authorMarkus Stange <mstange@themasta.com>
Wed, 10 Jun 2015 12:54:52 -0400
changeset 248299 9718bc90b5c2dfe1edc035b58985ab6e02683155
parent 248298 65759f28c5dfdf790ace209b6450b385ea02e31a
child 248300 67527d8c06880c1af9832bb7414520648869393c
push id60931
push usermstange@themasta.com
push dateThu, 11 Jun 2015 15:11:40 +0000
treeherdermozilla-inbound@cf0a2595a1fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud
bugs971811
milestone41.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 971811 - Don't prepend an empty existing DYLD_INSERT_LIBRARIES path when launching the plugin. r=smichaud
ipc/glue/GeckoChildProcessHost.cpp
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -631,17 +631,17 @@ GeckoChildProcessHost::PerformAsyncLaunc
     //
     // Trigger "dyld interposing" for the dylib that contains
     // plugin_child_interpose.mm.  This allows us to hook OS calls in the
     // plugin process (ones that don't work correctly in a background
     // process).  Don't break any other "dyld interposing" that has already
     // been set up by whatever may have launched the browser.
     const char* prevInterpose = PR_GetEnv("DYLD_INSERT_LIBRARIES");
     nsCString interpose;
-    if (prevInterpose) {
+    if (prevInterpose && strlen(prevInterpose) > 0) {
       interpose.Assign(prevInterpose);
       interpose.Append(':');
     }
     interpose.Append(path.get());
     interpose.AppendLiteral("/libplugin_child_interpose.dylib");
     newEnvVars["DYLD_INSERT_LIBRARIES"] = interpose.get();
 # endif  // OS_LINUX
   }