Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/SourceLocation.h

Issue 2035653006: [DevTools] Move Console to v8 inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved api a bit Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/CrossThreadCopier.h" 9 #include "platform/CrossThreadCopier.h"
10 #include "platform/v8_inspector/public/V8StackTrace.h" 10 #include "platform/v8_inspector/public/V8StackTrace.h"
(...skipping 26 matching lines...) Expand all
37 37
38 static std::unique_ptr<SourceLocation> create(const String& url, unsigned li neNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId = 0 ); 38 static std::unique_ptr<SourceLocation> create(const String& url, unsigned li neNumber, unsigned columnNumber, std::unique_ptr<V8StackTrace>, int scriptId = 0 );
39 ~SourceLocation(); 39 ~SourceLocation();
40 40
41 bool isUnknown() const { return m_url.isNull() && !m_scriptId && !m_lineNumb er; } 41 bool isUnknown() const { return m_url.isNull() && !m_scriptId && !m_lineNumb er; }
42 const String& url() const { return m_url; } 42 const String& url() const { return m_url; }
43 unsigned lineNumber() const { return m_lineNumber; } 43 unsigned lineNumber() const { return m_lineNumber; }
44 unsigned columnNumber() const { return m_columnNumber; } 44 unsigned columnNumber() const { return m_columnNumber; }
45 int scriptId() const { return m_scriptId; } 45 int scriptId() const { return m_scriptId; }
46 46
47 std::unique_ptr<V8StackTrace> cloneStackTrace() const;
47 std::unique_ptr<SourceLocation> clone() const; 48 std::unique_ptr<SourceLocation> clone() const;
48 std::unique_ptr<SourceLocation> isolatedCopy() const; // Safe to pass betwee n threads. 49 std::unique_ptr<SourceLocation> isolatedCopy() const; // Safe to pass betwee n threads.
49 50
50 // No-op when stack trace is unknown. 51 // No-op when stack trace is unknown.
51 void toTracedValue(TracedValue*, const char* name) const; 52 void toTracedValue(TracedValue*, const char* name) const;
52 53
53 // Could be null string when stack trace is unknown. 54 // Could be null string when stack trace is unknown.
54 String toString() const; 55 String toString() const;
55 56
56 // Could be null when stack trace is unknown. 57 // Could be null when stack trace is unknown.
(...skipping 15 matching lines...) Expand all
72 using Type = std::unique_ptr<SourceLocation>; 73 using Type = std::unique_ptr<SourceLocation>;
73 static Type copy(std::unique_ptr<SourceLocation> location) 74 static Type copy(std::unique_ptr<SourceLocation> location)
74 { 75 {
75 return location ? location->isolatedCopy() : nullptr; 76 return location ? location->isolatedCopy() : nullptr;
76 } 77 }
77 }; 78 };
78 79
79 } // namespace blink 80 } // namespace blink
80 81
81 #endif // SourceLocation_h 82 #endif // SourceLocation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698