Chromium Code Reviews| Index: src/debug/debug-interface.h |
| diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h |
| index 0577ecc4ca2b5980aaa979da0e74831b9a2bea47..7238bb3d10327f741ddf035a6ed11420cb359ff6 100644 |
| --- a/src/debug/debug-interface.h |
| +++ b/src/debug/debug-interface.h |
| @@ -6,6 +6,7 @@ |
| #define V8_DEBUG_DEBUG_INTERFACE_H_ |
| #include "include/v8-debug.h" |
| +#include "include/v8-util.h" |
| #include "include/v8.h" |
| namespace v8 { |
| @@ -138,6 +139,42 @@ class DebugInterface { |
| static void PrepareStep(Isolate* isolate, StepAction action); |
| static void ClearStepping(Isolate* isolate); |
| + |
| + /** |
| + * Native wrapper around v8::internal::Script object. |
| + */ |
| + class Script { |
| + public: |
| + v8::Isolate* GetIsolate() const; |
| + |
| + ScriptOriginOptions OriginOptions() const; |
| + bool WasCompiled() const; |
| + int Id() const; |
| + int LineOffset() const; |
| + int ColumnOffset() const; |
| + std::vector<int> LineEnds() const; |
| + MaybeLocal<String> Name() const; |
| + MaybeLocal<String> SourceURL() const; |
| + MaybeLocal<String> SourceMappingURL() const; |
| + MaybeLocal<String> ContextData() const; |
| + MaybeLocal<String> Source() const; |
| + |
| + /** |
| + * script parameter is a wrapper v8::internal::JSObject for |
| + * v8::internal::Script. |
| + * This functions get v8::internal::Script from v8::internal::JSObject and |
| + * wrap it with DebugInterface::Script. |
| + * 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.
|
| + * v8::internal::Script. |
| + */ |
| + static MaybeLocal<Script> Wrap(v8::Local<v8::Object> script); |
| + }; |
| + |
| + /** |
| + * Return array of compiled scripts. |
| + */ |
| + static void GetLoadedScripts(Isolate* isolate, |
| + PersistentValueVector<Script>& scripts); |
| }; |
| } // namespace v8 |