Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Issue 11529008: Fix extraction of environment variables on Windows. (Closed)

Created:
8 years ago by Mads Ager (google)
Modified:
8 years ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org, Bob Nystrom
Visibility:
Public.

Description

Fix extraction of environment variables on Windows. Environment variables were extracted using GetEnvironmentStringsA and that does not play nice with for instance Danish letters in environment variables. This causes problems for pub if the current user has an internationalized name. This is the first patch in a series that will switch to the unicode APIs on Windows. R=sgjesse@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=15977

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -11 lines) Patch
M runtime/bin/platform_win.cc View 1 1 chunk +16 lines, -6 lines 0 comments Download
A + tests/standalone/io/windows_environment_script.dart View 1 1 chunk +4 lines, -5 lines 0 comments Download
A tests/standalone/io/windows_environment_test.dart View 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mads Ager (google)
8 years ago (2012-12-11 14:27:08 UTC) #1
Mads Ager (google)
+rnystrom
8 years ago (2012-12-11 14:32:59 UTC) #2
Søren Gjesse
lgtm https://codereview.chromium.org/11529008/diff/1/runtime/bin/platform_win.cc File runtime/bin/platform_win.cc (right): https://codereview.chromium.org/11529008/diff/1/runtime/bin/platform_win.cc#newcode40 runtime/bin/platform_win.cc:40: char* utf8 = reinterpret_cast<char*>(malloc(len+1)); Spaces in arithmetic expression. ...
8 years ago (2012-12-11 14:39:47 UTC) #3
Mads Ager (google)
8 years ago (2012-12-11 14:41:54 UTC) #4
https://codereview.chromium.org/11529008/diff/1/runtime/bin/platform_win.cc
File runtime/bin/platform_win.cc (right):

https://codereview.chromium.org/11529008/diff/1/runtime/bin/platform_win.cc#n...
runtime/bin/platform_win.cc:40: char* utf8 =
reinterpret_cast<char*>(malloc(len+1));
On 2012/12/11 14:39:47, Søren Gjesse wrote:
> Spaces in arithmetic expression.

Done.

https://codereview.chromium.org/11529008/diff/1/tests/standalone/io/windows_e...
File tests/standalone/io/windows_environment_script.dart (right):

https://codereview.chromium.org/11529008/diff/1/tests/standalone/io/windows_e...
tests/standalone/io/windows_environment_script.dart:9:
//Expect.isTrue(scriptDir.contains('å'));
On 2012/12/11 14:39:47, Søren Gjesse wrote:
> Code in comment.

Whoops. Added the code again.

Powered by Google App Engine
This is Rietveld 408576698