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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8ConsoleMessage.h

Issue 2170263002: [DevTools] Pass error object when reporting exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: worklets! Created 4 years, 4 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 V8ConsoleMessage_h 5 #ifndef V8ConsoleMessage_h
6 #define V8ConsoleMessage_h 6 #define V8ConsoleMessage_h
7 7
8 #include "platform/inspector_protocol/Collections.h" 8 #include "platform/inspector_protocol/Collections.h"
9 #include "platform/inspector_protocol/String16.h" 9 #include "platform/inspector_protocol/String16.h"
10 #include "platform/v8_inspector/protocol/Console.h" 10 #include "platform/v8_inspector/protocol/Console.h"
(...skipping 18 matching lines...) Expand all
29 29
30 static std::unique_ptr<V8ConsoleMessage> createForConsoleAPI( 30 static std::unique_ptr<V8ConsoleMessage> createForConsoleAPI(
31 double timestamp, 31 double timestamp,
32 ConsoleAPIType, 32 ConsoleAPIType,
33 const std::vector<v8::Local<v8::Value>>& arguments, 33 const std::vector<v8::Local<v8::Value>>& arguments,
34 std::unique_ptr<V8StackTraceImpl>, 34 std::unique_ptr<V8StackTraceImpl>,
35 InspectedContext*); 35 InspectedContext*);
36 36
37 static std::unique_ptr<V8ConsoleMessage> createForException( 37 static std::unique_ptr<V8ConsoleMessage> createForException(
38 double timestamp, 38 double timestamp,
39 const String16& message, 39 const String16& detailedMessage,
40 const String16& url, 40 const String16& url,
41 unsigned lineNumber, 41 unsigned lineNumber,
42 unsigned columnNumber, 42 unsigned columnNumber,
43 std::unique_ptr<V8StackTraceImpl>, 43 std::unique_ptr<V8StackTraceImpl>,
44 int scriptId, 44 int scriptId,
45 v8::Isolate*, 45 v8::Isolate*,
46 const String16& message,
46 int contextId, 47 int contextId,
47 v8::Local<v8::Value> exception, 48 v8::Local<v8::Value> exception,
48 unsigned exceptionId); 49 unsigned exceptionId);
49 50
50 static std::unique_ptr<V8ConsoleMessage> createForRevokedException( 51 static std::unique_ptr<V8ConsoleMessage> createForRevokedException(
51 double timestamp, 52 double timestamp,
52 const String16& message, 53 const String16& message,
53 unsigned revokedExceptionId); 54 unsigned revokedExceptionId);
54 55
55 V8MessageOrigin origin() const; 56 V8MessageOrigin origin() const;
(...skipping 16 matching lines...) Expand all
72 String16 m_url; 73 String16 m_url;
73 unsigned m_lineNumber; 74 unsigned m_lineNumber;
74 unsigned m_columnNumber; 75 unsigned m_columnNumber;
75 std::unique_ptr<V8StackTraceImpl> m_stackTrace; 76 std::unique_ptr<V8StackTraceImpl> m_stackTrace;
76 int m_scriptId; 77 int m_scriptId;
77 int m_contextId; 78 int m_contextId;
78 ConsoleAPIType m_type; 79 ConsoleAPIType m_type;
79 unsigned m_exceptionId; 80 unsigned m_exceptionId;
80 unsigned m_revokedExceptionId; 81 unsigned m_revokedExceptionId;
81 Arguments m_arguments; 82 Arguments m_arguments;
83 String16 m_detailedMessage;
82 }; 84 };
83 85
84 class V8ConsoleMessageStorage { 86 class V8ConsoleMessageStorage {
85 public: 87 public:
86 V8ConsoleMessageStorage(V8DebuggerImpl*, int contextGroupId); 88 V8ConsoleMessageStorage(V8DebuggerImpl*, int contextGroupId);
87 ~V8ConsoleMessageStorage(); 89 ~V8ConsoleMessageStorage();
88 90
89 int contextGroupId() { return m_contextGroupId; } 91 int contextGroupId() { return m_contextGroupId; }
90 int expiredCount() { return m_expiredCount; } 92 int expiredCount() { return m_expiredCount; }
91 const std::deque<std::unique_ptr<V8ConsoleMessage>>& messages() const { retu rn m_messages; } 93 const std::deque<std::unique_ptr<V8ConsoleMessage>>& messages() const { retu rn m_messages; }
92 94
93 void addMessage(std::unique_ptr<V8ConsoleMessage>); 95 void addMessage(std::unique_ptr<V8ConsoleMessage>);
94 void contextDestroyed(int contextId); 96 void contextDestroyed(int contextId);
95 void clear(); 97 void clear();
96 98
97 private: 99 private:
98 V8DebuggerImpl* m_debugger; 100 V8DebuggerImpl* m_debugger;
99 int m_contextGroupId; 101 int m_contextGroupId;
100 int m_expiredCount; 102 int m_expiredCount;
101 std::deque<std::unique_ptr<V8ConsoleMessage>> m_messages; 103 std::deque<std::unique_ptr<V8ConsoleMessage>> m_messages;
102 }; 104 };
103 105
104 } // namespace blink 106 } // namespace blink
105 107
106 #endif // V8ConsoleMessage_h 108 #endif // V8ConsoleMessage_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698