| 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 "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 CHECK_CALLBACK_STATE(isolate); | 1640 CHECK_CALLBACK_STATE(isolate); |
| 1641 Monitor monitor; | 1641 Monitor monitor; |
| 1642 MonitorLocker ml(&monitor); | 1642 MonitorLocker ml(&monitor); |
| 1643 { | 1643 { |
| 1644 SwitchIsolateScope switch_scope(NULL); | 1644 SwitchIsolateScope switch_scope(NULL); |
| 1645 | 1645 |
| 1646 RunLoopData data; | 1646 RunLoopData data; |
| 1647 data.monitor = &monitor; | 1647 data.monitor = &monitor; |
| 1648 data.done = false; | 1648 data.done = false; |
| 1649 isolate->message_handler()->Run( | 1649 isolate->message_handler()->Run( |
| 1650 Dart::thread_pool(), | |
| 1651 NULL, RunLoopDone, reinterpret_cast<uword>(&data)); | 1650 NULL, RunLoopDone, reinterpret_cast<uword>(&data)); |
| 1652 while (!data.done) { | 1651 while (!data.done) { |
| 1653 ml.Wait(); | 1652 ml.Wait(); |
| 1654 } | 1653 } |
| 1655 } | 1654 } |
| 1656 if (isolate->object_store()->sticky_error() != Object::null()) { | 1655 if (isolate->object_store()->sticky_error() != Object::null()) { |
| 1657 Dart_Handle error = Api::NewHandle(isolate, | 1656 Dart_Handle error = Api::NewHandle(isolate, |
| 1658 isolate->object_store()->sticky_error()); | 1657 isolate->object_store()->sticky_error()); |
| 1659 isolate->object_store()->clear_sticky_error(); | 1658 isolate->object_store()->clear_sticky_error(); |
| 1660 return error; | 1659 return error; |
| (...skipping 4126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5787 ASSERT(stream != NULL); | 5786 ASSERT(stream != NULL); |
| 5788 TimelineEvent* event = stream->StartEvent(); | 5787 TimelineEvent* event = stream->StartEvent(); |
| 5789 if (event != NULL) { | 5788 if (event != NULL) { |
| 5790 event->AsyncEnd(label, async_id); | 5789 event->AsyncEnd(label, async_id); |
| 5791 event->Complete(); | 5790 event->Complete(); |
| 5792 } | 5791 } |
| 5793 return Api::Success(); | 5792 return Api::Success(); |
| 5794 } | 5793 } |
| 5795 | 5794 |
| 5796 } // namespace dart | 5795 } // namespace dart |
| OLD | NEW |