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

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

Issue 2449213002: [inspector] migrate scriptParsed and getCompiledScripts to native (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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_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
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 function gets v8::internal::Script from v8::internal::JSObject and
166 * wraps it with DebugInterface::Script.
167 * Returns empty local if not called with a valid wrapper of
168 * v8::internal::Script.
169 */
170 static MaybeLocal<Script> Wrap(Isolate* isolate,
171 v8::Local<v8::Object> script);
172 };
173
174 /**
175 * Return array of compiled scripts.
176 */
177 static void GetLoadedScripts(Isolate* isolate,
178 PersistentValueVector<Script>& scripts);
141 }; 179 };
142 180
143 } // namespace v8 181 } // namespace v8
144 182
145 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ 183 #endif // V8_DEBUG_DEBUG_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698