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

Unified Diff: sdk/lib/isolate/isolate.dart

Issue 1350053002: Add "environment" parameter to spawnUri for String.fromEnvironment support. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
Index: sdk/lib/isolate/isolate.dart
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index d5534ba71436bc0e4e10d6f12928165e9102b407..ec75fde7872d42b13d6e617f476460f4c35aa5ad 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -237,6 +237,15 @@ class Isolate {
* WARNING: The [packageRoot] and [packages] parameters are not implemented
* on all platforms yet.
*
+ * The [environment] is a mapping from strings to strings which the
+ * spawned isolate uses when looking up [String.fromEnvironment] values.
Siggi Cherem (dart-lang) 2015/09/17 17:06:57 is this also meant to be used for the other `fromE
floitsch 2015/09/17 18:23:10 This Map should be used for all X.fromEnvironment
Ivan Posva 2015/09/17 21:55:20 We do have a pretty good explanation on how the St
Lasse Reichstein Nielsen 2015/09/22 09:05:39 I didn't write about int/bool.fromEnv because they
+ * The system may add its own entries to environment as well.
+ * If `environment` is omitted, the spawned isolate has the same environment
+ * declarations as the spawning isolate.
+ *
+ * WARNING: The [environment] parameter is not implemented on all
+ * platforms yet.
+ *
* Returns a future that will complete with an [Isolate] instance if the
* spawning succeeded. It will complete with an error otherwise.
*/
@@ -250,7 +259,8 @@ class Isolate {
Map<String, Uri> packages,
bool errorsAreFatal,
SendPort onExit,
- SendPort onError});
+ SendPort onError,
+ Map<String, String> environment});
Ivan Posva 2015/09/17 21:55:20 I find it interesting that the new parameter is ad
Lasse Reichstein Nielsen 2015/09/22 09:05:39 I've reordered them everywhere, so that the parame
Ivan Posva 2015/09/22 09:56:59 Thanks!
/**
* Requests the isolate to pause.

Powered by Google App Engine
This is Rietveld 408576698