Chromium Code Reviews| 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); |
| } |