Index: src/inspector/v8-stack-trace-impl.h |
diff --git a/src/inspector/v8-stack-trace-impl.h b/src/inspector/v8-stack-trace-impl.h |
index 38722ea2f11324efa71b7bc6b9fe55a3239aced6..ba8fa3feeb712362948c73ee3f225d350cff73de 100644 |
--- a/src/inspector/v8-stack-trace-impl.h |
+++ b/src/inspector/v8-stack-trace-impl.h |
@@ -20,6 +20,28 @@ class AsyncStackTrace; |
class V8Debugger; |
class WasmTranslation; |
+class StackFrame { |
+ public: |
+ explicit StackFrame(v8::Local<v8::StackFrame> frame); |
+ ~StackFrame() = default; |
+ |
+ void translate(WasmTranslation* wasmTranslation); |
+ |
+ const String16& functionName() const; |
+ const String16& scriptId() const; |
+ const String16& sourceURL() const; |
+ int lineNumber() const; // 0-based. |
+ int columnNumber() const; // 0-based. |
+ std::unique_ptr<protocol::Runtime::CallFrame> buildInspectorObject() const; |
+ |
+ private: |
+ String16 m_functionName; |
+ String16 m_scriptId; |
+ String16 m_sourceURL; |
+ int m_lineNumber; // 0-based. |
+ int m_columnNumber; // 0-based. |
+}; |
+ |
class V8StackTraceImpl : public V8StackTrace { |
public: |
static void setCaptureStackTraceForUncaughtExceptions(v8::Isolate*, |
@@ -50,34 +72,13 @@ class V8StackTraceImpl : public V8StackTrace { |
const override; |
std::unique_ptr<StringBuffer> toString() const override; |
- class Frame { |
- public: |
- explicit Frame(v8::Local<v8::StackFrame> frame); |
- ~Frame() = default; |
- |
- void translate(WasmTranslation* wasmTranslation); |
- |
- const String16& functionName() const; |
- const String16& scriptId() const; |
- const String16& sourceURL() const; |
- int lineNumber() const; // 0-based. |
- int columnNumber() const; // 0-based. |
- std::unique_ptr<protocol::Runtime::CallFrame> buildInspectorObject() const; |
- |
- private: |
- String16 m_functionName; |
- String16 m_scriptId; |
- String16 m_sourceURL; |
- int m_lineNumber; // 0-based. |
- int m_columnNumber; // 0-based. |
- }; |
- |
private: |
- V8StackTraceImpl(const std::vector<Frame> frames, int maxAsyncDepth, |
+ V8StackTraceImpl(std::vector<std::shared_ptr<StackFrame>> frames, |
+ int maxAsyncDepth, |
std::shared_ptr<AsyncStackTrace> asyncParent, |
std::shared_ptr<AsyncStackTrace> asyncCreation); |
- std::vector<Frame> m_frames; |
+ std::vector<std::shared_ptr<StackFrame>> m_frames; |
int m_maxAsyncDepth; |
std::weak_ptr<AsyncStackTrace> m_asyncParent; |
std::weak_ptr<AsyncStackTrace> m_asyncCreation; |
@@ -102,14 +103,14 @@ class AsyncStackTrace { |
private: |
AsyncStackTrace(int contextGroupId, const String16& description, |
- const std::vector<V8StackTraceImpl::Frame>& frames, |
+ std::vector<std::shared_ptr<StackFrame>> frames, |
std::shared_ptr<AsyncStackTrace> asyncParent, |
std::shared_ptr<AsyncStackTrace> asyncCreation); |
int m_contextGroupId; |
String16 m_description; |
- std::vector<V8StackTraceImpl::Frame> m_frames; |
+ std::vector<std::shared_ptr<StackFrame>> m_frames; |
std::weak_ptr<AsyncStackTrace> m_asyncParent; |
std::weak_ptr<AsyncStackTrace> m_asyncCreation; |