| 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 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 } | 1967 } |
| 1968 } | 1968 } |
| 1969 | 1969 |
| 1970 | 1970 |
| 1971 void Isolate::PrintJSON(JSONStream* stream, bool ref) { | 1971 void Isolate::PrintJSON(JSONStream* stream, bool ref) { |
| 1972 if (!FLAG_support_service) { | 1972 if (!FLAG_support_service) { |
| 1973 return; | 1973 return; |
| 1974 } | 1974 } |
| 1975 JSONObject jsobj(stream); | 1975 JSONObject jsobj(stream); |
| 1976 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); | 1976 jsobj.AddProperty("type", (ref ? "@Isolate" : "Isolate")); |
| 1977 jsobj.AddFixedServiceId("isolates/%" Pd64 "", | 1977 jsobj.AddFixedServiceId(ISOLATE_SERVICE_ID_FORMAT_STRING, |
| 1978 static_cast<int64_t>(main_port())); | 1978 static_cast<int64_t>(main_port())); |
| 1979 | 1979 |
| 1980 jsobj.AddProperty("name", debugger_name()); | 1980 jsobj.AddProperty("name", debugger_name()); |
| 1981 jsobj.AddPropertyF("number", "%" Pd64 "", static_cast<int64_t>(main_port())); | 1981 jsobj.AddPropertyF("number", "%" Pd64 "", static_cast<int64_t>(main_port())); |
| 1982 if (ref) { | 1982 if (ref) { |
| 1983 return; | 1983 return; |
| 1984 } | 1984 } |
| 1985 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", | 1985 jsobj.AddPropertyF("_originNumber", "%" Pd64 "", |
| 1986 static_cast<int64_t>(origin_id())); | 1986 static_cast<int64_t>(origin_id())); |
| 1987 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; | 1987 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2936 void IsolateSpawnState::DecrementSpawnCount() { | 2936 void IsolateSpawnState::DecrementSpawnCount() { |
| 2937 ASSERT(spawn_count_monitor_ != NULL); | 2937 ASSERT(spawn_count_monitor_ != NULL); |
| 2938 ASSERT(spawn_count_ != NULL); | 2938 ASSERT(spawn_count_ != NULL); |
| 2939 MonitorLocker ml(spawn_count_monitor_); | 2939 MonitorLocker ml(spawn_count_monitor_); |
| 2940 ASSERT(*spawn_count_ > 0); | 2940 ASSERT(*spawn_count_ > 0); |
| 2941 *spawn_count_ = *spawn_count_ - 1; | 2941 *spawn_count_ = *spawn_count_ - 1; |
| 2942 ml.Notify(); | 2942 ml.Notify(); |
| 2943 } | 2943 } |
| 2944 | 2944 |
| 2945 } // namespace dart | 2945 } // namespace dart |
| OLD | NEW |