OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_mirrors_api.h" | 5 #include "include/dart_mirrors_api.h" |
6 #include "include/dart_tools_api.h" | 6 #include "include/dart_tools_api.h" |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 1497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1508 Dart_ExitScope(); | 1508 Dart_ExitScope(); |
1509 Dart_ShutdownIsolate(); | 1509 Dart_ShutdownIsolate(); |
1510 } | 1510 } |
1511 | 1511 |
1512 | 1512 |
1513 TEST_CASE(Debug_InterruptIsolate) { | 1513 TEST_CASE(Debug_InterruptIsolate) { |
1514 Dart_SetIsolateEventHandler(&TestInterruptIsolate); | 1514 Dart_SetIsolateEventHandler(&TestInterruptIsolate); |
1515 sync = new Monitor(); | 1515 sync = new Monitor(); |
1516 EXPECT(interrupt_isolate_id == ILLEGAL_ISOLATE_ID); | 1516 EXPECT(interrupt_isolate_id == ILLEGAL_ISOLATE_ID); |
1517 Dart_SetPausedEventHandler(InterruptIsolateHandler); | 1517 Dart_SetPausedEventHandler(InterruptIsolateHandler); |
1518 int result = OSThread::Start(InterruptIsolateRun, 0); | 1518 int result = OSThread::Start("DebugInterruptIsolate", InterruptIsolateRun, 0); |
1519 EXPECT_EQ(0, result); | 1519 EXPECT_EQ(0, result); |
1520 | 1520 |
1521 // Wait for the test isolate to be created. | 1521 // Wait for the test isolate to be created. |
1522 { | 1522 { |
1523 MonitorLocker ml(sync); | 1523 MonitorLocker ml(sync); |
1524 while (interrupt_isolate_id == ILLEGAL_ISOLATE_ID) { | 1524 while (interrupt_isolate_id == ILLEGAL_ISOLATE_ID) { |
1525 ml.Wait(); | 1525 ml.Wait(); |
1526 } | 1526 } |
1527 } | 1527 } |
1528 EXPECT(interrupt_isolate_id != ILLEGAL_ISOLATE_ID); | 1528 EXPECT(interrupt_isolate_id != ILLEGAL_ISOLATE_ID); |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," | 2321 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," |
2322 " null, 4, 13, 3, 14, 10," | 2322 " null, 4, 13, 3, 14, 10," |
2323 " null, 5, 17, 5, 18, 9, 19, 12," | 2323 " null, 5, 17, 5, 18, 9, 19, 12," |
2324 " null, 6, 21, 1," | 2324 " null, 6, 21, 1," |
2325 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," | 2325 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," |
2326 " null, 9, 29, 1]", | 2326 " null, 9, 29, 1]", |
2327 tokens_cstr); | 2327 tokens_cstr); |
2328 } | 2328 } |
2329 | 2329 |
2330 } // namespace dart | 2330 } // namespace dart |
OLD | NEW |