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_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-util.h" |
| 10 #include "include/v8.h" | 10 #include "include/v8.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 bool WasCompiled() const; | 151 bool WasCompiled() const; |
| 152 int Id() const; | 152 int Id() const; |
| 153 int LineOffset() const; | 153 int LineOffset() const; |
| 154 int ColumnOffset() const; | 154 int ColumnOffset() const; |
| 155 std::vector<int> LineEnds() const; | 155 std::vector<int> LineEnds() const; |
| 156 MaybeLocal<String> Name() const; | 156 MaybeLocal<String> Name() const; |
| 157 MaybeLocal<String> SourceURL() const; | 157 MaybeLocal<String> SourceURL() const; |
| 158 MaybeLocal<String> SourceMappingURL() const; | 158 MaybeLocal<String> SourceMappingURL() const; |
| 159 MaybeLocal<String> ContextData() const; | 159 MaybeLocal<String> ContextData() const; |
| 160 MaybeLocal<String> Source() const; | 160 MaybeLocal<String> Source() const; |
| 161 /** | |
| 162 * lines and columns are 0-based. | |
| 163 */ | |
| 164 bool GetPossibleBreakpoints(int start_line, int start_column, int end_line, | |
| 165 int end_column, | |
| 166 std::vector<int>& positions) const; | |
| 161 | 167 |
| 162 /** | 168 /** |
| 163 * script parameter is a wrapper v8::internal::JSObject for | 169 * script parameter is a wrapper v8::internal::JSObject for |
| 164 * v8::internal::Script. | 170 * v8::internal::Script. |
| 165 * This function gets v8::internal::Script from v8::internal::JSObject and | 171 * This function gets v8::internal::Script from v8::internal::JSObject and |
| 166 * wraps it with DebugInterface::Script. | 172 * wraps it with DebugInterface::Script. |
| 167 * Returns empty local if not called with a valid wrapper of | 173 * Returns empty local if not called with a valid wrapper of |
| 168 * v8::internal::Script. | 174 * v8::internal::Script. |
| 169 */ | 175 */ |
| 170 static MaybeLocal<Script> Wrap(Isolate* isolate, | 176 static MaybeLocal<Script> Wrap(Isolate* isolate, |
| 171 v8::Local<v8::Object> script); | 177 v8::Local<v8::Object> script); |
| 178 | |
| 179 private: | |
| 180 int Offset(int line, int column) const; | |
|
Yang
2016/11/02 13:51:15
Can we have a nicer name? GetSourcePosition maybe?
kozy
2016/11/03 01:15:02
Done.
| |
| 172 }; | 181 }; |
| 173 | 182 |
| 174 /** | 183 /** |
| 175 * Return array of compiled scripts. | 184 * Return array of compiled scripts. |
| 176 */ | 185 */ |
| 177 static void GetLoadedScripts(Isolate* isolate, | 186 static void GetLoadedScripts(Isolate* isolate, |
| 178 PersistentValueVector<Script>& scripts); | 187 PersistentValueVector<Script>& scripts); |
| 179 }; | 188 }; |
| 180 | 189 |
| 181 } // namespace v8 | 190 } // namespace v8 |
| 182 | 191 |
| 183 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ | 192 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ |
| OLD | NEW |