30 #ifndef V8_INSPECTOR_V8_DEBUGGER_SCRIPT_H_ 31 #define V8_INSPECTOR_V8_DEBUGGER_SCRIPT_H_ 33 #include "src/base/macros.h" 34 #include "src/inspector/string-16.h" 35 #include "src/inspector/string-util.h" 37 #include "include/v8.h" 38 #include "src/debug/debug-interface.h" 43 class V8InspectorClient;
44 class WasmTranslation;
48 static std::unique_ptr<V8DebuggerScript> Create(
51 static std::unique_ptr<V8DebuggerScript> CreateWasm(
58 const String16& scriptId()
const {
return m_id; }
59 bool hasSourceURLComment()
const {
return m_hasSourceURLComment; }
60 const String16& sourceURL()
const {
return m_url; }
62 virtual const String16& sourceMappingURL()
const = 0;
63 virtual String16 source(
size_t pos,
size_t len = UINT_MAX)
const = 0;
64 virtual const String16& hash()
const = 0;
65 virtual int startLine()
const = 0;
66 virtual int startColumn()
const = 0;
67 virtual int endLine()
const = 0;
68 virtual int endColumn()
const = 0;
69 int executionContextId()
const {
return m_executionContextId; }
70 virtual bool isLiveEdit()
const = 0;
71 virtual bool isModule()
const = 0;
72 virtual bool isSourceLoadedLazily()
const = 0;
73 virtual int length()
const = 0;
76 virtual void setSourceMappingURL(
const String16&) = 0;
77 virtual void setSource(
const String16& source,
bool preview,
80 virtual bool getPossibleBreakpoints(
82 bool ignoreNestedFunctions,
83 std::vector<v8::debug::BreakLocation>* locations) = 0;
84 virtual void resetBlackboxedStateCache() = 0;
86 static const int kNoOffset = -1;
87 virtual int offset(
int lineNumber,
int columnNumber)
const = 0;
90 virtual bool setBreakpoint(
const String16& condition,
100 bool m_hasSourceURLComment =
false;
101 int m_executionContextId = 0;
103 v8::Isolate* m_isolate;
111 #endif // V8_INSPECTOR_V8_DEBUGGER_SCRIPT_H_