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 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 GrowableObjectArray::Handle(registered_service_extension_handlers()); | 2083 GrowableObjectArray::Handle(registered_service_extension_handlers()); |
2084 if (!handlers.IsNull()) { | 2084 if (!handlers.IsNull()) { |
2085 JSONArray extensions(&jsobj, "extensionRPCs"); | 2085 JSONArray extensions(&jsobj, "extensionRPCs"); |
2086 String& handler_name = String::Handle(); | 2086 String& handler_name = String::Handle(); |
2087 for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) { | 2087 for (intptr_t i = 0; i < handlers.Length(); i += kRegisteredEntrySize) { |
2088 handler_name ^= handlers.At(i + kRegisteredNameIndex); | 2088 handler_name ^= handlers.At(i + kRegisteredNameIndex); |
2089 extensions.AddValue(handler_name.ToCString()); | 2089 extensions.AddValue(handler_name.ToCString()); |
2090 } | 2090 } |
2091 } | 2091 } |
2092 } | 2092 } |
| 2093 |
| 2094 jsobj.AddProperty("threads", thread_registry_); |
2093 } | 2095 } |
2094 #endif | 2096 #endif |
2095 | 2097 |
2096 | 2098 |
2097 void Isolate::set_tag_table(const GrowableObjectArray& value) { | 2099 void Isolate::set_tag_table(const GrowableObjectArray& value) { |
2098 tag_table_ = value.raw(); | 2100 tag_table_ = value.raw(); |
2099 } | 2101 } |
2100 | 2102 |
2101 | 2103 |
2102 void Isolate::set_current_tag(const UserTag& tag) { | 2104 void Isolate::set_current_tag(const UserTag& tag) { |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2936 void IsolateSpawnState::DecrementSpawnCount() { | 2938 void IsolateSpawnState::DecrementSpawnCount() { |
2937 ASSERT(spawn_count_monitor_ != NULL); | 2939 ASSERT(spawn_count_monitor_ != NULL); |
2938 ASSERT(spawn_count_ != NULL); | 2940 ASSERT(spawn_count_ != NULL); |
2939 MonitorLocker ml(spawn_count_monitor_); | 2941 MonitorLocker ml(spawn_count_monitor_); |
2940 ASSERT(*spawn_count_ > 0); | 2942 ASSERT(*spawn_count_ > 0); |
2941 *spawn_count_ = *spawn_count_ - 1; | 2943 *spawn_count_ = *spawn_count_ - 1; |
2942 ml.Notify(); | 2944 ml.Notify(); |
2943 } | 2945 } |
2944 | 2946 |
2945 } // namespace dart | 2947 } // namespace dart |
OLD | NEW |