| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/v8_inspector/V8ProfilerAgentImpl.h" | 5 #include "platform/v8_inspector/V8ProfilerAgentImpl.h" |
| 6 | 6 |
| 7 #include "platform/v8_inspector/Atomics.h" | 7 #include "platform/v8_inspector/Atomics.h" |
| 8 #include "platform/v8_inspector/StringUtil.h" |
| 8 #include "platform/v8_inspector/V8Debugger.h" | 9 #include "platform/v8_inspector/V8Debugger.h" |
| 9 #include "platform/v8_inspector/V8InspectorImpl.h" | 10 #include "platform/v8_inspector/V8InspectorImpl.h" |
| 10 #include "platform/v8_inspector/V8InspectorSessionImpl.h" | 11 #include "platform/v8_inspector/V8InspectorSessionImpl.h" |
| 11 #include "platform/v8_inspector/V8StackTraceImpl.h" | 12 #include "platform/v8_inspector/V8StackTraceImpl.h" |
| 12 #include "platform/v8_inspector/V8StringUtil.h" | 13 #include "platform/v8_inspector/protocol/Protocol.h" |
| 13 #include <v8-profiler.h> | 14 #include <v8-profiler.h> |
| 14 | 15 |
| 15 #include <vector> | 16 #include <vector> |
| 16 | 17 |
| 17 #define ENSURE_V8_VERSION(major, minor) \ | 18 #define ENSURE_V8_VERSION(major, minor) \ |
| 18 (V8_MAJOR_VERSION * 1000 + V8_MINOR_VERSION >= (major) * 1000 + (minor)) | 19 (V8_MAJOR_VERSION * 1000 + V8_MINOR_VERSION >= (major) * 1000 + (minor)) |
| 19 | 20 |
| 20 namespace v8_inspector { | 21 namespace v8_inspector { |
| 21 | 22 |
| 22 namespace ProfilerAgentState { | 23 namespace ProfilerAgentState { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 v8::CpuProfiler* V8ProfilerAgentImpl::profiler() | 330 v8::CpuProfiler* V8ProfilerAgentImpl::profiler() |
| 330 { | 331 { |
| 331 #if ENSURE_V8_VERSION(5, 4) | 332 #if ENSURE_V8_VERSION(5, 4) |
| 332 return m_profiler; | 333 return m_profiler; |
| 333 #else | 334 #else |
| 334 return m_isolate->GetCpuProfiler(); | 335 return m_isolate->GetCpuProfiler(); |
| 335 #endif | 336 #endif |
| 336 } | 337 } |
| 337 | 338 |
| 338 } // namespace v8_inspector | 339 } // namespace v8_inspector |
| OLD | NEW |