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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1655393004: Fix some API documentation bugs in new pause on start exit APIs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« runtime/include/dart_api.h ('K') | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 3c4cb1789dfdcc513acd3a3f2c959f3113ffe670..673c54f8270b52b7c65ab7ac0b66d8867b92e59f 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1376,6 +1376,10 @@ DART_EXPORT bool Dart_ShouldPauseOnStart() {
DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause) {
Isolate* isolate = Isolate::Current();
CHECK_ISOLATE(isolate);
+ if (isolate->is_runnable()) {
+ FATAL1("%s expects the current isolate to not be runnable yet.",
+ CURRENT_FUNC);
+ }
return isolate->message_handler()->set_should_pause_on_start(should_pause);
}
@@ -1406,6 +1410,10 @@ DART_EXPORT bool Dart_ShouldPauseOnExit() {
DART_EXPORT void Dart_SetShouldPauseOnExit(bool should_pause) {
Isolate* isolate = Isolate::Current();
CHECK_ISOLATE(isolate);
+ if (isolate->is_runnable()) {
+ FATAL1("%s expects the current isolate to not be runnable yet.",
+ CURRENT_FUNC);
turnidge 2016/02/04 17:13:38 I could see allowing this to be set late.
Cutch 2016/02/04 17:26:58 Done and comment updated.
+ }
return isolate->message_handler()->set_should_pause_on_exit(should_pause);
}
« runtime/include/dart_api.h ('K') | « runtime/include/dart_api.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698