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 "vm/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 #include "platform/text_buffer.h" | 10 #include "platform/text_buffer.h" |
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 } | 1777 } |
1778 | 1778 |
1779 { | 1779 { |
1780 JSONObject tagCounters(&jsobj, "_tagCounters"); | 1780 JSONObject tagCounters(&jsobj, "_tagCounters"); |
1781 vm_tag_counters()->PrintToJSONObject(&tagCounters); | 1781 vm_tag_counters()->PrintToJSONObject(&tagCounters); |
1782 } | 1782 } |
1783 if (Thread::Current()->sticky_error() != Object::null()) { | 1783 if (Thread::Current()->sticky_error() != Object::null()) { |
1784 Error& error = Error::Handle(Thread::Current()->sticky_error()); | 1784 Error& error = Error::Handle(Thread::Current()->sticky_error()); |
1785 ASSERT(!error.IsNull()); | 1785 ASSERT(!error.IsNull()); |
1786 jsobj.AddProperty("error", error, false); | 1786 jsobj.AddProperty("error", error, false); |
| 1787 } else if (sticky_error() != Object::null()) { |
| 1788 Error& error = Error::Handle(sticky_error()); |
| 1789 ASSERT(!error.IsNull()); |
| 1790 jsobj.AddProperty("error", error, false); |
1787 } | 1791 } |
1788 | 1792 |
1789 { | 1793 { |
1790 const GrowableObjectArray& libs = | 1794 const GrowableObjectArray& libs = |
1791 GrowableObjectArray::Handle(object_store()->libraries()); | 1795 GrowableObjectArray::Handle(object_store()->libraries()); |
1792 intptr_t num_libs = libs.Length(); | 1796 intptr_t num_libs = libs.Length(); |
1793 Library& lib = Library::Handle(); | 1797 Library& lib = Library::Handle(); |
1794 | 1798 |
1795 JSONArray lib_array(&jsobj, "libraries"); | 1799 JSONArray lib_array(&jsobj, "libraries"); |
1796 for (intptr_t i = 0; i < num_libs; i++) { | 1800 for (intptr_t i = 0; i < num_libs; i++) { |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 void IsolateSpawnState::DecrementSpawnCount() { | 2646 void IsolateSpawnState::DecrementSpawnCount() { |
2643 ASSERT(spawn_count_monitor_ != NULL); | 2647 ASSERT(spawn_count_monitor_ != NULL); |
2644 ASSERT(spawn_count_ != NULL); | 2648 ASSERT(spawn_count_ != NULL); |
2645 MonitorLocker ml(spawn_count_monitor_); | 2649 MonitorLocker ml(spawn_count_monitor_); |
2646 ASSERT(*spawn_count_ > 0); | 2650 ASSERT(*spawn_count_ > 0); |
2647 *spawn_count_ = *spawn_count_ - 1; | 2651 *spawn_count_ = *spawn_count_ - 1; |
2648 ml.Notify(); | 2652 ml.Notify(); |
2649 } | 2653 } |
2650 | 2654 |
2651 } // namespace dart | 2655 } // namespace dart |
OLD | NEW |