Bug 624422 - Let plugin-container load libmozgtk2. r=glandium

This commit is contained in:
Emilio Pozuelo Monfort 2014-05-01 13:37:48 +02:00
parent 63ec880d1b
commit 3f42f462b4
2 changed files with 18 additions and 1 deletions

View File

@ -574,6 +574,22 @@ GeckoChildProcessHost::PerformAsyncLaunchInternal(std::vector<std::string>& aExt
} else { } else {
newEnvVars["LD_LIBRARY_PATH"] = path.get(); newEnvVars["LD_LIBRARY_PATH"] = path.get();
} }
# if (MOZ_WIDGET_GTK == 3)
const char *ld_preload = PR_GetEnv("LD_PRELOAD");
nsCString new_ld_preload;
new_ld_preload.Assign(path.get());
new_ld_preload.AppendLiteral("/" DLL_PREFIX "mozgtk2" DLL_SUFFIX);
if (ld_preload && *ld_preload) {
new_ld_preload.AppendLiteral(":");
new_ld_preload.Append(ld_preload);
}
newEnvVars["LD_PRELOAD"] = new_ld_preload.get();
# endif // MOZ_WIDGET_GTK
# elif OS_MACOSX # elif OS_MACOSX
newEnvVars["DYLD_LIBRARY_PATH"] = path.get(); newEnvVars["DYLD_LIBRARY_PATH"] = path.get();
// XXX DYLD_INSERT_LIBRARIES should only be set when launching a plugin // XXX DYLD_INSERT_LIBRARIES should only be set when launching a plugin

View File

@ -140,7 +140,8 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul' FINAL_LIBRARY = 'xul'
for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE'): for var in ('MOZ_CHILD_PROCESS_NAME', 'MOZ_CHILD_PROCESS_BUNDLE',
'DLL_PREFIX', 'DLL_SUFFIX'):
DEFINES[var] = '"%s"' % CONFIG[var] DEFINES[var] = '"%s"' % CONFIG[var]
LOCAL_INCLUDES += [ LOCAL_INCLUDES += [