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_DEBUG_INTERFACE_H_ | 5 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_ |
6 #define V8_DEBUG_DEBUG_INTERFACE_H_ | 6 #define V8_DEBUG_DEBUG_INTERFACE_H_ |
7 | 7 |
8 #include "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
9 #include "include/v8-util.h" | |
9 #include "include/v8.h" | 10 #include "include/v8.h" |
10 | 11 |
11 namespace v8 { | 12 namespace v8 { |
12 | 13 |
13 class DebugInterface { | 14 class DebugInterface { |
14 public: | 15 public: |
15 /** | 16 /** |
16 * An event details object passed to the debug event listener. | 17 * An event details object passed to the debug event listener. |
17 */ | 18 */ |
18 class EventDetails : public v8::Debug::EventDetails { | 19 class EventDetails : public v8::Debug::EventDetails { |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 enum StepAction { | 132 enum StepAction { |
132 StepOut = 0, // Step out of the current function. | 133 StepOut = 0, // Step out of the current function. |
133 StepNext = 1, // Step to the next statement in the current function. | 134 StepNext = 1, // Step to the next statement in the current function. |
134 StepIn = 2, // Step into new functions invoked or the next statement | 135 StepIn = 2, // Step into new functions invoked or the next statement |
135 // in the current function. | 136 // in the current function. |
136 StepFrame = 3 // Step into a new frame or return to previous frame. | 137 StepFrame = 3 // Step into a new frame or return to previous frame. |
137 }; | 138 }; |
138 | 139 |
139 static void PrepareStep(Isolate* isolate, StepAction action); | 140 static void PrepareStep(Isolate* isolate, StepAction action); |
140 static void ClearStepping(Isolate* isolate); | 141 static void ClearStepping(Isolate* isolate); |
142 | |
143 /** | |
144 * Native wrapper around v8::internal::Script object. | |
145 */ | |
146 class Script { | |
147 public: | |
148 v8::Isolate* GetIsolate() const; | |
149 | |
150 ScriptOriginOptions OriginOptions() const; | |
151 bool WasCompiled() const; | |
152 int Id() const; | |
153 int LineOffset() const; | |
154 int ColumnOffset() const; | |
155 std::vector<int> LineEnds() const; | |
156 MaybeLocal<String> Name() const; | |
157 MaybeLocal<String> SourceURL() const; | |
158 MaybeLocal<String> SourceMappingURL() const; | |
159 MaybeLocal<String> ContextData() const; | |
160 MaybeLocal<String> Source() const; | |
161 | |
162 /** | |
163 * script parameter is a wrapper v8::internal::JSObject for | |
164 * v8::internal::Script. | |
165 * This functions get v8::internal::Script from v8::internal::JSObject and | |
166 * wrap it with DebugInterface::Script. | |
167 * Return empty local if called with not a wrapper over | |
dgozman
2016/10/28 22:52:51
Returns empty local if not called with a valid wra
kozy
2016/10/29 01:26:06
Done.
| |
168 * v8::internal::Script. | |
169 */ | |
170 static MaybeLocal<Script> Wrap(v8::Local<v8::Object> script); | |
171 }; | |
172 | |
173 /** | |
174 * Return array of compiled scripts. | |
175 */ | |
176 static void GetLoadedScripts(Isolate* isolate, | |
177 PersistentValueVector<Script>& scripts); | |
141 }; | 178 }; |
142 | 179 |
143 } // namespace v8 | 180 } // namespace v8 |
144 | 181 |
145 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ | 182 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ |
OLD | NEW |