| 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 SourceLocation_h | 5 #ifndef SourceLocation_h |
| 6 #define SourceLocation_h | 6 #define SourceLocation_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/v8_inspector/public/V8StackTrace.h" | 9 #include "platform/v8_inspector/public/V8StackTrace.h" |
| 10 #include "wtf/Forward.h" | 10 #include "wtf/Forward.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 static PassOwnPtr<SourceLocation> capture(ExecutionContext* = nullptr); | 26 static PassOwnPtr<SourceLocation> capture(ExecutionContext* = nullptr); |
| 27 | 27 |
| 28 static PassOwnPtr<SourceLocation> create(const String& url, unsigned lineNum
ber, unsigned columnNumber, PassOwnPtr<V8StackTrace>, int scriptId = 0); | 28 static PassOwnPtr<SourceLocation> create(const String& url, unsigned lineNum
ber, unsigned columnNumber, PassOwnPtr<V8StackTrace>, int scriptId = 0); |
| 29 ~SourceLocation(); | 29 ~SourceLocation(); |
| 30 | 30 |
| 31 String url() const { return m_url; } | 31 String url() const { return m_url; } |
| 32 unsigned lineNumber() const { return m_lineNumber; } | 32 unsigned lineNumber() const { return m_lineNumber; } |
| 33 unsigned columnNumber() const { return m_columnNumber; } | 33 unsigned columnNumber() const { return m_columnNumber; } |
| 34 PassOwnPtr<V8StackTrace> takeStackTrace() { return std::move(m_stackTrace);
} | 34 PassOwnPtr<V8StackTrace> takeStackTrace() { return std::move(m_stackTrace);
} |
| 35 int scriptId() const { return m_scriptId; } | 35 int scriptId() const { return m_scriptId; } |
| 36 void toTracedValue(TracedValue*, const char* name) const; |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber
, PassOwnPtr<V8StackTrace>, int scriptId); | 39 SourceLocation(const String& url, unsigned lineNumber, unsigned columnNumber
, PassOwnPtr<V8StackTrace>, int scriptId); |
| 39 | 40 |
| 40 String m_url; | 41 String m_url; |
| 41 unsigned m_lineNumber; | 42 unsigned m_lineNumber; |
| 42 unsigned m_columnNumber; | 43 unsigned m_columnNumber; |
| 43 OwnPtr<V8StackTrace> m_stackTrace; | 44 OwnPtr<V8StackTrace> m_stackTrace; |
| 44 int m_scriptId; | 45 int m_scriptId; |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 } // namespace blink | 48 } // namespace blink |
| 48 | 49 |
| 49 #endif // SourceLocation_h | 50 #endif // SourceLocation_h |
| OLD | NEW |