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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 ASSERT(isolate != NULL); | 1394 ASSERT(isolate != NULL); |
1395 Dart_EnterScope(); | 1395 Dart_EnterScope(); |
1396 LoadScript(kScriptChars); | 1396 LoadScript(kScriptChars); |
1397 Dart_Handle retval = Invoke("main"); | 1397 Dart_Handle retval = Invoke("main"); |
1398 EXPECT_VALID(retval); | 1398 EXPECT_VALID(retval); |
1399 EXPECT(test_isolate_id != ILLEGAL_ISOLATE_ID); | 1399 EXPECT(test_isolate_id != ILLEGAL_ISOLATE_ID); |
1400 EXPECT(Dart_GetIsolate(test_isolate_id) == isolate); | 1400 EXPECT(Dart_GetIsolate(test_isolate_id) == isolate); |
1401 EXPECT(Dart_GetIsolateId(isolate) == test_isolate_id); | 1401 EXPECT(Dart_GetIsolateId(isolate) == test_isolate_id); |
1402 Dart_ExitScope(); | 1402 Dart_ExitScope(); |
1403 Dart_ShutdownIsolate(); | 1403 Dart_ShutdownIsolate(); |
| 1404 Dart_SetIsolateEventHandler(NULL); |
1404 EXPECT(verify_callback == 0x5); // Only created and shutdown events. | 1405 EXPECT(verify_callback == 0x5); // Only created and shutdown events. |
1405 } | 1406 } |
1406 | 1407 |
1407 | 1408 |
1408 static Monitor* sync = NULL; | 1409 static Monitor* sync = NULL; |
1409 static bool isolate_interrupted = false; | 1410 static bool isolate_interrupted = false; |
1410 static bool pause_event_handled = false; | 1411 static bool pause_event_handled = false; |
1411 static Dart_IsolateId interrupt_isolate_id = ILLEGAL_ISOLATE_ID; | 1412 static Dart_IsolateId interrupt_isolate_id = ILLEGAL_ISOLATE_ID; |
1412 static volatile bool continue_isolate_loop = true; | 1413 static volatile bool continue_isolate_loop = true; |
1413 | 1414 |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," | 2310 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," |
2310 " null, 4, 13, 3, 14, 10," | 2311 " null, 4, 13, 3, 14, 10," |
2311 " null, 5, 17, 5, 18, 9, 19, 12," | 2312 " null, 5, 17, 5, 18, 9, 19, 12," |
2312 " null, 6, 21, 1," | 2313 " null, 6, 21, 1," |
2313 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," | 2314 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," |
2314 " null, 9, 29, 1]", | 2315 " null, 9, 29, 1]", |
2315 tokens_cstr); | 2316 tokens_cstr); |
2316 } | 2317 } |
2317 | 2318 |
2318 } // namespace dart | 2319 } // namespace dart |
OLD | NEW |