Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 V8_DEBUG_INTERFACE_TYPES_H_ | 5 #ifndef V8_DEBUG_INTERFACE_TYPES_H_ |
| 6 #define V8_DEBUG_INTERFACE_TYPES_H_ | 6 #define V8_DEBUG_INTERFACE_TYPES_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "include/v8.h" | |
| 12 #include "src/globals.h" | 13 #include "src/globals.h" |
| 13 | 14 |
| 14 namespace v8 { | 15 namespace v8 { |
| 15 namespace debug { | 16 namespace debug { |
| 16 | 17 |
| 17 /** | 18 /** |
| 18 * Defines location inside script. | 19 * Defines location inside script. |
| 19 * Lines and columns are 0-based. | 20 * Lines and columns are 0-based. |
| 20 */ | 21 */ |
| 21 class V8_EXPORT_PRIVATE Location { | 22 class V8_EXPORT_PRIVATE Location { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 public: | 84 public: |
| 84 BreakLocation(int line_number, int column_number, BreakLocationType type) | 85 BreakLocation(int line_number, int column_number, BreakLocationType type) |
| 85 : Location(line_number, column_number), type_(type) {} | 86 : Location(line_number, column_number), type_(type) {} |
| 86 | 87 |
| 87 BreakLocationType type() const { return type_; } | 88 BreakLocationType type() const { return type_; } |
| 88 | 89 |
| 89 private: | 90 private: |
| 90 BreakLocationType type_; | 91 BreakLocationType type_; |
| 91 }; | 92 }; |
| 92 | 93 |
| 94 // v8::FunctionCallbackInfo could be used for getting arguments only. Calling | |
| 95 // of any other getter will produce a crash. | |
| 96 class ConsoleDelegate { | |
| 97 public: | |
| 98 virtual void Debug(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
|
dgozman
2017/04/03 20:19:42
Should we move ConsoleCallArguments here and priva
kozy
2017/04/03 22:34:41
Done.
| |
| 99 virtual void Error(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 100 virtual void Info(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 101 virtual void Log(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 102 virtual void Warn(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 103 virtual void Dir(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 104 virtual void DirXml(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 105 virtual void Table(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 106 virtual void Trace(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 107 virtual void Group(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 108 virtual void GroupCollapsed(const v8::FunctionCallbackInfo<v8::Value>& info) { | |
| 109 } | |
| 110 virtual void GroupEnd(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 111 virtual void Clear(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 112 virtual void Count(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 113 virtual void Assert(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 114 virtual void MarkTimeline(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 115 virtual void Profile(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 116 virtual void ProfileEnd(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 117 virtual void Timeline(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 118 virtual void TimelineEnd(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 119 virtual void Time(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 120 virtual void TimeEnd(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 121 virtual void TimeStamp(const v8::FunctionCallbackInfo<v8::Value>& info) {} | |
| 122 virtual ~ConsoleDelegate() = default; | |
| 123 }; | |
| 124 | |
| 93 } // namespace debug | 125 } // namespace debug |
| 94 } // namespace v8 | 126 } // namespace v8 |
| 95 | 127 |
| 96 #endif // V8_DEBUG_INTERFACE_TYPES_H_ | 128 #endif // V8_DEBUG_INTERFACE_TYPES_H_ |
| OLD | NEW |