Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make EnvironmentVariables::appendValue() handle the case where the ex…
…isting value is an empty string.

https://bugs.webkit.org/show_bug.cgi?id=141818.

Patch by Remy Demarest <rdemarest@apple.com> on 2015-02-19
Reviewed by Dan Bernstein.

* UIProcess/Launcher/mac/EnvironmentVariables.cpp:
(WebKit::EnvironmentVariables::appendValue): If the existing value is an empty string, replace it rather than
append to it.

Canonical link: https://commits.webkit.org/159845@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
RemyDemarest authored and webkit-commit-queue committed Feb 20, 2015
1 parent 35e1fea commit 84a4a1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,14 @@
2015-02-19 Remy Demarest <rdemarest@apple.com>

Make EnvironmentVariables::appendValue() handle the case where the existing value is an empty string.
https://bugs.webkit.org/show_bug.cgi?id=141818.

Reviewed by Dan Bernstein.

* UIProcess/Launcher/mac/EnvironmentVariables.cpp:
(WebKit::EnvironmentVariables::appendValue): If the existing value is an empty string, replace it rather than
append to it.

2015-02-19 Anders Carlsson <andersca@apple.com>

Make C SPI objects and modern API objects toll-free bridged
Expand Down
Expand Up @@ -79,7 +79,7 @@ const char* EnvironmentVariables::get(const char* name) const
void EnvironmentVariables::appendValue(const char* name, const char* value, char separator)
{
const char* existingValue = get(name);
if (!existingValue) {
if (!existingValue || !strlen(existingValue)) {
set(name, value);
return;
}
Expand Down

0 comments on commit 84a4a1c

Please sign in to comment.