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

Unified Diff: sdk/lib/io/platform_impl.dart

Issue 2273053002: Ignore non-UTF8 strings in the environment (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/platform.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/platform_impl.dart
diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart
index 75278443388f638eed4f792de401ef8c68604cbf..92d56994a3563e3e4fd7d1d27b189e0c51014edc 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -66,6 +66,9 @@ class _Platform {
? new _CaseInsensitiveStringMap<String>()
: new Map<String, String>();
for (var str in env) {
+ if (str == null) {
+ continue;
+ }
// The Strings returned by [_environment()] are expected to be
// valid environment entries, but exceptions have been seen
// (e.g., an entry of just '=' has been seen on OS/X).
« no previous file with comments | « runtime/bin/platform.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698