OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gin/public/v8_platform.h" | 5 #include "gin/public/v8_platform.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/threading/worker_pool.h" | 9 #include "base/threading/worker_pool.h" |
| 10 #include "base/trace_event/trace_event.h" |
10 #include "gin/per_isolate_data.h" | 11 #include "gin/per_isolate_data.h" |
11 | 12 |
12 namespace gin { | 13 namespace gin { |
13 | 14 |
14 namespace { | 15 namespace { |
15 | 16 |
16 base::LazyInstance<V8Platform>::Leaky g_v8_platform = LAZY_INSTANCE_INITIALIZER; | 17 base::LazyInstance<V8Platform>::Leaky g_v8_platform = LAZY_INSTANCE_INITIALIZER; |
17 | 18 |
18 } // namespace | 19 } // namespace |
19 | 20 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 void V8Platform::UpdateTraceEventDuration(const uint8_t* category_enabled_flag, | 94 void V8Platform::UpdateTraceEventDuration(const uint8_t* category_enabled_flag, |
94 const char* name, | 95 const char* name, |
95 uint64_t handle) { | 96 uint64_t handle) { |
96 base::trace_event::TraceEventHandle traceEventHandle; | 97 base::trace_event::TraceEventHandle traceEventHandle; |
97 memcpy(&traceEventHandle, &handle, sizeof(handle)); | 98 memcpy(&traceEventHandle, &handle, sizeof(handle)); |
98 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_enabled_flag, name, | 99 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_enabled_flag, name, |
99 traceEventHandle); | 100 traceEventHandle); |
100 } | 101 } |
101 | 102 |
102 } // namespace gin | 103 } // namespace gin |
OLD | NEW |