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

Side by Side Diff: src/debug/interface-types.h

Issue 2728563002: [inspector] added type of break location into getPossibleBreakpoints output (Closed)
Patch Set: a Created 3 years, 9 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 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>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 * All numbers are 0-based. 43 * All numbers are 0-based.
44 */ 44 */
45 struct WasmDisassemblyOffsetTableEntry { 45 struct WasmDisassemblyOffsetTableEntry {
46 WasmDisassemblyOffsetTableEntry(uint32_t byte_offset, int line, int column) 46 WasmDisassemblyOffsetTableEntry(uint32_t byte_offset, int line, int column)
47 : byte_offset(byte_offset), line(line), column(column) {} 47 : byte_offset(byte_offset), line(line), column(column) {}
48 48
49 uint32_t byte_offset; 49 uint32_t byte_offset;
50 int line; 50 int line;
51 int column; 51 int column;
52 }; 52 };
53
53 struct WasmDisassembly { 54 struct WasmDisassembly {
54 using OffsetTable = std::vector<WasmDisassemblyOffsetTableEntry>; 55 using OffsetTable = std::vector<WasmDisassemblyOffsetTableEntry>;
55 WasmDisassembly() {} 56 WasmDisassembly() {}
56 WasmDisassembly(std::string disassembly, OffsetTable offset_table) 57 WasmDisassembly(std::string disassembly, OffsetTable offset_table)
57 : disassembly(std::move(disassembly)), 58 : disassembly(std::move(disassembly)),
58 offset_table(std::move(offset_table)) {} 59 offset_table(std::move(offset_table)) {}
59 60
60 std::string disassembly; 61 std::string disassembly;
61 OffsetTable offset_table; 62 OffsetTable offset_table;
62 }; 63 };
63 64
64 enum PromiseDebugActionType { 65 enum PromiseDebugActionType {
65 kDebugPromiseCreated, 66 kDebugPromiseCreated,
66 kDebugEnqueueAsyncFunction, 67 kDebugEnqueueAsyncFunction,
67 kDebugEnqueuePromiseResolve, 68 kDebugEnqueuePromiseResolve,
68 kDebugEnqueuePromiseReject, 69 kDebugEnqueuePromiseReject,
69 kDebugPromiseCollected, 70 kDebugPromiseCollected,
70 kDebugWillHandle, 71 kDebugWillHandle,
71 kDebugDidHandle, 72 kDebugDidHandle,
72 }; 73 };
73 74
75 class V8_EXPORT_PRIVATE BreakLocation {
dgozman 2017/03/01 22:10:47 Let's inherit from Location?
kozy 2017/03/01 23:14:13 Done.
76 public:
77 BreakLocation(const Location& location, bool is_call, bool is_return,
78 bool is_debugger_statement)
79 : location_(location),
80 is_call_(is_call),
81 is_return_(is_return),
82 is_debugger_statement_(is_debugger_statement) {}
83
84 const Location& GetLocation() const { return location_; }
85 Location& GetLocation() { return location_; }
86 bool IsCall() { return is_call_; }
87 bool IsReturn() { return is_return_; }
88 bool IsDebuggerStatement() { return is_debugger_statement_; }
89
90 private:
91 Location location_;
92 bool is_call_;
93 bool is_return_;
94 bool is_debugger_statement_;
95 };
96
74 } // namespace debug 97 } // namespace debug
75 } // namespace v8 98 } // namespace v8
76 99
77 #endif // V8_DEBUG_INTERFACE_TYPES_H_ 100 #endif // V8_DEBUG_INTERFACE_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698