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

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

Issue 1154673004: Add "checked" parameter to Isolate.spawnUri. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Skip test for everything but VM for now. Created 5 years, 7 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 | « sdk/lib/_internal/compiler/js_lib/isolate_patch.dart ('k') | tests/isolate/checked_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/isolate/isolate.dart
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 8c46d6047e28c56ae62455f2156588a5935d6d17..8372eafbc169c2562f212ff442b810ec352a6a54 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -148,8 +148,6 @@ class Isolate {
* before it starts running.
* To resume the isolate, call `isolate.resume(isolate.pauseCapability)`.
*
- * WARNING: The `pause` 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.
*/
@@ -172,6 +170,26 @@ class Isolate {
* When present, the parameter `args` is set to the provided [args] list.
* When present, the parameter `message` is set to the initial [message].
*
+ * If the [paused] parameter is set to `true`,
+ * the isolate will start up in a paused state,
+ * as if by an initial call of `isolate.pause(isolate.pauseCapability)`.
+ * This allows setting up error or exit listeners on the isolate
+ * before it starts running.
+ * To resume the isolate, call `isolate.resume(isolate.pauseCapability)`.
+ *
+ * If the [checked] parameter is set to `true` or `false`,
+ * the new isolate will run code in checked mode,
+ * respectively in production mode, if possible.
+ * If the parameter is omitted, the new isolate will inherit the
+ * value from the current isolate.
+ *
+ * It may not always be possible to honor the `checked` parameter.
+ * If the isolate code was pre-compiled, it may not be possible to change
+ * the checked mode setting dynamically.
+ * In that case, the `checked` parameter is ignored.
+ *
+ * WARNING: The [checked] parameter is not implemented on all platforms yet.
+ *
* If the [packageRoot] parameter is provided, it is used to find the location
* of packages imports in the spawned isolate.
* The `packageRoot` URI must be a "file" or "http"/"https" URI that specifies
@@ -187,15 +205,6 @@ class Isolate {
* WARNING: The [packageRoot] parameter is not implemented on all
* platforms yet.
*
- * If the [paused] parameter is set to `true`,
- * the isolate will start up in a paused state,
- * as if by an initial call of `isolate.pause(isolate.pauseCapability)`.
- * This allows setting up error or exit listeners on the isolate
- * before it starts running.
- * To resume the isolate, call `isolate.resume(isolate.pauseCapability)`.
- *
- * WARNING: The `pause` 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.
*/
@@ -204,6 +213,7 @@ class Isolate {
List<String> args,
var message,
{bool paused: false,
+ bool checked,
Uri packageRoot});
/**
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/isolate_patch.dart ('k') | tests/isolate/checked_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698