diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 21:26:47 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-23 21:26:47 +0000 |
commit | 3d2217d4327f2033ace44ab0aa87c9f50fc011fe (patch) | |
tree | 89444d2d3ceb9134ab9c0a8e35d06afe388c0966 /base/process_util_posix.cc | |
parent | ab417244b7fe6b281eaba42c10a045efd8474bb1 (diff) | |
download | chromium_src-3d2217d4327f2033ace44ab0aa87c9f50fc011fe.zip chromium_src-3d2217d4327f2033ace44ab0aa87c9f50fc011fe.tar.gz chromium_src-3d2217d4327f2033ace44ab0aa87c9f50fc011fe.tar.bz2 |
Fix environment variables not being used after switching to ChildProcessLauncher.
BUG=28602
TEST=verified flash works on Mac
Review URL: http://codereview.chromium.org/439005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_posix.cc')
-rw-r--r-- | base/process_util_posix.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 8b6987d..4392c7b 100644 --- a/base/process_util_posix.cc +++ b/base/process_util_posix.cc @@ -302,12 +302,13 @@ bool LaunchApp(const std::vector<std::string>& argv, for (environment_vector::const_iterator it = environ.begin(); it != environ.end(); ++it) { - if (it->first) { - if (it->second) { - setenv(it->first, it->second, 1); - } else { - unsetenv(it->first); - } + if (it->first.empty()) + continue; + + if (it->second.empty()) { + unsetenv(it->first.c_str()); + } else { + setenv(it->first.c_str(), it->second.c_str(), 1); } } |