OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "include/dart_native_api.h" | 7 #include "include/dart_native_api.h" |
8 | 8 |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 DART_EXPORT bool Dart_ShouldPauseOnStart() { | 1369 DART_EXPORT bool Dart_ShouldPauseOnStart() { |
1370 Isolate* isolate = Isolate::Current(); | 1370 Isolate* isolate = Isolate::Current(); |
1371 CHECK_ISOLATE(isolate); | 1371 CHECK_ISOLATE(isolate); |
1372 return isolate->message_handler()->should_pause_on_start(); | 1372 return isolate->message_handler()->should_pause_on_start(); |
1373 } | 1373 } |
1374 | 1374 |
1375 | 1375 |
1376 DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause) { | 1376 DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause) { |
1377 Isolate* isolate = Isolate::Current(); | 1377 Isolate* isolate = Isolate::Current(); |
1378 CHECK_ISOLATE(isolate); | 1378 CHECK_ISOLATE(isolate); |
| 1379 if (isolate->is_runnable()) { |
| 1380 FATAL1("%s expects the current isolate to not be runnable yet.", |
| 1381 CURRENT_FUNC); |
| 1382 } |
1379 return isolate->message_handler()->set_should_pause_on_start(should_pause); | 1383 return isolate->message_handler()->set_should_pause_on_start(should_pause); |
1380 } | 1384 } |
1381 | 1385 |
1382 | 1386 |
1383 DART_EXPORT bool Dart_IsPausedOnStart() { | 1387 DART_EXPORT bool Dart_IsPausedOnStart() { |
1384 Isolate* isolate = Isolate::Current(); | 1388 Isolate* isolate = Isolate::Current(); |
1385 CHECK_ISOLATE(isolate); | 1389 CHECK_ISOLATE(isolate); |
1386 return isolate->message_handler()->is_paused_on_start(); | 1390 return isolate->message_handler()->is_paused_on_start(); |
1387 } | 1391 } |
1388 | 1392 |
(...skipping 4731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6120 return Api::Success(); | 6124 return Api::Success(); |
6121 } | 6125 } |
6122 #endif // DART_PRECOMPILER | 6126 #endif // DART_PRECOMPILER |
6123 | 6127 |
6124 | 6128 |
6125 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6129 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
6126 return Dart::IsRunningPrecompiledCode(); | 6130 return Dart::IsRunningPrecompiledCode(); |
6127 } | 6131 } |
6128 | 6132 |
6129 } // namespace dart | 6133 } // namespace dart |
OLD | NEW |