| 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 "lib/stacktrace.h" | 10 #include "lib/stacktrace.h" |
| (...skipping 5944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5955 bool success = StreamTraceEvents(consumer, user_data, &js, false); | 5955 bool success = StreamTraceEvents(consumer, user_data, &js, false); |
| 5956 FinishStreamToConsumer(consumer, user_data, "timeline"); | 5956 FinishStreamToConsumer(consumer, user_data, "timeline"); |
| 5957 return success; | 5957 return success; |
| 5958 } | 5958 } |
| 5959 | 5959 |
| 5960 | 5960 |
| 5961 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( | 5961 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( |
| 5962 Dart_EmbedderTimelineStartRecording start_recording, | 5962 Dart_EmbedderTimelineStartRecording start_recording, |
| 5963 Dart_EmbedderTimelineStopRecording stop_recording, | 5963 Dart_EmbedderTimelineStopRecording stop_recording, |
| 5964 Dart_EmbedderTimelineGetTimeline get_timeline) { | 5964 Dart_EmbedderTimelineGetTimeline get_timeline) { |
| 5965 if (!FLAG_support_timeline) { |
| 5966 return; |
| 5967 } |
| 5965 Timeline::set_start_recording_cb(start_recording); | 5968 Timeline::set_start_recording_cb(start_recording); |
| 5966 Timeline::set_stop_recording_cb(stop_recording); | 5969 Timeline::set_stop_recording_cb(stop_recording); |
| 5967 Timeline::set_get_timeline_cb(get_timeline); | 5970 Timeline::set_get_timeline_cb(get_timeline); |
| 5968 } | 5971 } |
| 5969 | 5972 |
| 5970 | 5973 |
| 5971 DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer, | 5974 DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer, |
| 5972 void* user_data) { | 5975 void* user_data) { |
| 5973 if (!FLAG_support_timeline) { | 5976 if (!FLAG_support_timeline) { |
| 5974 return false; | 5977 return false; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6223 return Api::Success(); | 6226 return Api::Success(); |
| 6224 } | 6227 } |
| 6225 #endif // DART_PRECOMPILER | 6228 #endif // DART_PRECOMPILER |
| 6226 | 6229 |
| 6227 | 6230 |
| 6228 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { | 6231 DART_EXPORT bool Dart_IsRunningPrecompiledCode() { |
| 6229 return Dart::IsRunningPrecompiledCode(); | 6232 return Dart::IsRunningPrecompiledCode(); |
| 6230 } | 6233 } |
| 6231 | 6234 |
| 6232 } // namespace dart | 6235 } // namespace dart |
| OLD | NEW |