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_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_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 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 Dart_ExitScope(); | 1497 Dart_ExitScope(); |
1498 Dart_ShutdownIsolate(); | 1498 Dart_ShutdownIsolate(); |
1499 } | 1499 } |
1500 | 1500 |
1501 | 1501 |
1502 TEST_CASE(Debug_InterruptIsolate) { | 1502 TEST_CASE(Debug_InterruptIsolate) { |
1503 Dart_SetIsolateEventHandler(&TestInterruptIsolate); | 1503 Dart_SetIsolateEventHandler(&TestInterruptIsolate); |
1504 sync = new Monitor(); | 1504 sync = new Monitor(); |
1505 EXPECT(interrupt_isolate_id == ILLEGAL_ISOLATE_ID); | 1505 EXPECT(interrupt_isolate_id == ILLEGAL_ISOLATE_ID); |
1506 Dart_SetPausedEventHandler(InterruptIsolateHandler); | 1506 Dart_SetPausedEventHandler(InterruptIsolateHandler); |
1507 int result = Thread::Start(InterruptIsolateRun, 0); | 1507 int result = OSThread::Start(InterruptIsolateRun, 0); |
1508 EXPECT_EQ(0, result); | 1508 EXPECT_EQ(0, result); |
1509 | 1509 |
1510 // Wait for the test isolate to be created. | 1510 // Wait for the test isolate to be created. |
1511 { | 1511 { |
1512 MonitorLocker ml(sync); | 1512 MonitorLocker ml(sync); |
1513 while (interrupt_isolate_id == ILLEGAL_ISOLATE_ID) { | 1513 while (interrupt_isolate_id == ILLEGAL_ISOLATE_ID) { |
1514 ml.Wait(); | 1514 ml.Wait(); |
1515 } | 1515 } |
1516 } | 1516 } |
1517 EXPECT(interrupt_isolate_id != ILLEGAL_ISOLATE_ID); | 1517 EXPECT(interrupt_isolate_id != ILLEGAL_ISOLATE_ID); |
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," | 2313 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," |
2314 " null, 4, 13, 3, 14, 10," | 2314 " null, 4, 13, 3, 14, 10," |
2315 " null, 5, 17, 5, 18, 9, 19, 12," | 2315 " null, 5, 17, 5, 18, 9, 19, 12," |
2316 " null, 6, 21, 1," | 2316 " null, 6, 21, 1," |
2317 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," | 2317 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," |
2318 " null, 9, 29, 1]", | 2318 " null, 9, 29, 1]", |
2319 tokens_cstr); | 2319 tokens_cstr); |
2320 } | 2320 } |
2321 | 2321 |
2322 } // namespace dart | 2322 } // namespace dart |
OLD | NEW |