| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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/bootstrap_natives.h" | 5 #include "vm/bootstrap_natives.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
| 10 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 duration, | 118 duration, |
| 119 args.ToCString()); | 119 args.ToCString()); |
| 120 | 120 |
| 121 TimelineEvent* event = isolate->GetDartStream()->StartEvent(); | 121 TimelineEvent* event = isolate->GetDartStream()->StartEvent(); |
| 122 if (event == NULL) { | 122 if (event == NULL) { |
| 123 // Stream was turned off. | 123 // Stream was turned off. |
| 124 return Object::null(); | 124 return Object::null(); |
| 125 } | 125 } |
| 126 // json was allocated in the zone and a copy will be stored in event. | 126 // json was allocated in the zone and a copy will be stored in event. |
| 127 event->SerializedJSON(json, start.AsInt64Value(), end.AsInt64Value()); | 127 event->SerializedJSON(json, start.AsInt64Value(), end.AsInt64Value()); |
| 128 event->SetSerializedJSONIsDuration(true); |
| 128 event->Complete(); | 129 event->Complete(); |
| 129 | 130 |
| 130 return Object::null(); | 131 return Object::null(); |
| 131 } | 132 } |
| 132 | 133 |
| 133 | 134 |
| 134 DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) { | 135 DEFINE_NATIVE_ENTRY(Timeline_reportInstantEvent, 4) { |
| 135 GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0)); | 136 GET_NON_NULL_NATIVE_ARGUMENT(Integer, start, arguments->NativeArgAt(0)); |
| 136 GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(1)); | 137 GET_NON_NULL_NATIVE_ARGUMENT(String, category, arguments->NativeArgAt(1)); |
| 137 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(2)); | 138 GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(2)); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 168 return Object::null(); | 169 return Object::null(); |
| 169 } | 170 } |
| 170 // json was allocated in the zone and a copy will be stored in event. | 171 // json was allocated in the zone and a copy will be stored in event. |
| 171 event->SerializedJSON(json, start.AsInt64Value(), 0); | 172 event->SerializedJSON(json, start.AsInt64Value(), 0); |
| 172 event->Complete(); | 173 event->Complete(); |
| 173 | 174 |
| 174 return Object::null(); | 175 return Object::null(); |
| 175 } | 176 } |
| 176 | 177 |
| 177 } // namespace dart | 178 } // namespace dart |
| OLD | NEW |