OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef V8StackTrace_h | 5 #ifndef V8StackTrace_h |
6 #define V8StackTrace_h | 6 #define V8StackTrace_h |
7 | 7 |
8 #include "platform/inspector_protocol/Platform.h" | 8 #include "platform/inspector_protocol/InspectorProtocol.h" |
9 #include "platform/inspector_protocol/String16.h" | |
10 #include "platform/v8_inspector/public/protocol/Runtime.h" | 9 #include "platform/v8_inspector/public/protocol/Runtime.h" |
11 | 10 |
12 #include <v8.h> | 11 #include <v8.h> |
13 | 12 |
14 namespace blink { | 13 namespace blink { |
15 | 14 |
16 class V8StackTrace { | 15 class V8StackTrace { |
17 public: | 16 public: |
18 virtual bool isEmpty() const = 0; | 17 virtual bool isEmpty() const = 0; |
19 virtual String16 topSourceURL() const = 0; | 18 virtual String16 topSourceURL() const = 0; |
20 virtual int topLineNumber() const = 0; | 19 virtual int topLineNumber() const = 0; |
21 virtual int topColumnNumber() const = 0; | 20 virtual int topColumnNumber() const = 0; |
22 virtual String16 topScriptId() const = 0; | 21 virtual String16 topScriptId() const = 0; |
23 virtual String16 topFunctionName() const = 0; | 22 virtual String16 topFunctionName() const = 0; |
24 | 23 |
25 virtual ~V8StackTrace() { } | 24 virtual ~V8StackTrace() { } |
26 virtual std::unique_ptr<protocol::Runtime::API::StackTrace> buildInspectorOb
ject() const = 0; | 25 virtual std::unique_ptr<protocol::Runtime::API::StackTrace> buildInspectorOb
ject() const = 0; |
27 virtual String16 toString() const = 0; | 26 virtual String16 toString() const = 0; |
28 | 27 |
29 // Safe to pass between threads, drops async chain. | 28 // Safe to pass between threads, drops async chain. |
30 virtual std::unique_ptr<V8StackTrace> clone() = 0; | 29 virtual std::unique_ptr<V8StackTrace> clone() = 0; |
31 }; | 30 }; |
32 | 31 |
33 } // namespace blink | 32 } // namespace blink |
34 | 33 |
35 #endif // V8StackTrace_h | 34 #endif // V8StackTrace_h |
OLD | NEW |