| Index: src/inspector/v8-debugger-script.h
|
| diff --git a/src/inspector/v8-debugger-script.h b/src/inspector/v8-debugger-script.h
|
| index 4405756460fc58ed8417fa85a054a469bd2e33fe..654a8703c28eabf3c84fa5885764400a4abf17de 100644
|
| --- a/src/inspector/v8-debugger-script.h
|
| +++ b/src/inspector/v8-debugger-script.h
|
| @@ -40,44 +40,46 @@ namespace v8_inspector {
|
|
|
| class V8DebuggerScript {
|
| public:
|
| - V8DebuggerScript(v8::Isolate* isolate,
|
| - v8::Local<v8::DebugInterface::Script> script,
|
| - bool isLiveEdit);
|
| - V8DebuggerScript(String16 id, String16 url, String16 source);
|
| - ~V8DebuggerScript();
|
| + static std::unique_ptr<V8DebuggerScript> Create(
|
| + v8::Isolate* isolate, v8::Local<v8::DebugInterface::Script> script,
|
| + bool isLiveEdit);
|
| + // TODO(clemensh): Move away from using scripts for wasm (bug 667767).
|
| + static std::unique_ptr<V8DebuggerScript> CreateWasm(
|
| + v8::Local<v8::DebugInterface::Script> script, String16 id, String16 url,
|
| + String16 source);
|
| +
|
| + virtual ~V8DebuggerScript();
|
|
|
| const String16& scriptId() const { return m_id; }
|
| const String16& url() const { return m_url; }
|
| bool hasSourceURL() const { return !m_sourceURL.isEmpty(); }
|
| const String16& sourceURL() const;
|
| - const String16& sourceMappingURL() const { return m_sourceMappingURL; }
|
| - String16 source(v8::Isolate*) const;
|
| + virtual const String16& sourceMappingURL() const = 0;
|
| + virtual String16 source(v8::Isolate*) const { return m_source; }
|
| const String16& hash(v8::Isolate*) const;
|
| int startLine() const { return m_startLine; }
|
| int startColumn() const { return m_startColumn; }
|
| int endLine() const { return m_endLine; }
|
| int endColumn() const { return m_endColumn; }
|
| int executionContextId() const { return m_executionContextId; }
|
| - const String16& executionContextAuxData() const {
|
| - return m_executionContextAuxData;
|
| - }
|
| - bool isLiveEdit() const { return m_isLiveEdit; }
|
| + virtual const String16& executionContextAuxData() const = 0;
|
| + virtual bool isLiveEdit() const = 0;
|
|
|
| void setSourceURL(const String16&);
|
| - void setSourceMappingURL(const String16&);
|
| - void setSource(v8::Local<v8::String>);
|
| + virtual void setSourceMappingURL(const String16&) {}
|
| + virtual void setSource(v8::Local<v8::String>) {}
|
|
|
| - bool getPossibleBreakpoints(
|
| + virtual bool getPossibleBreakpoints(
|
| const v8::DebugInterface::Location& start,
|
| const v8::DebugInterface::Location& end,
|
| - std::vector<v8::DebugInterface::Location>* locations);
|
| + std::vector<v8::DebugInterface::Location>* locations) = 0;
|
| +
|
| + protected:
|
| + V8DebuggerScript(v8::Isolate*, String16 id, String16 url);
|
|
|
| - private:
|
| String16 m_id;
|
| String16 m_url;
|
| String16 m_sourceURL;
|
| - String16 m_sourceMappingURL;
|
| - v8::Global<v8::String> m_sourceObj;
|
| String16 m_source;
|
| mutable String16 m_hash;
|
| int m_startLine = 0;
|
| @@ -85,12 +87,10 @@ class V8DebuggerScript {
|
| int m_endLine = 0;
|
| int m_endColumn = 0;
|
| int m_executionContextId = 0;
|
| - String16 m_executionContextAuxData;
|
| - bool m_isLiveEdit = false;
|
|
|
| v8::Isolate* m_isolate;
|
| - v8::Global<v8::DebugInterface::Script> m_script;
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript);
|
| };
|
|
|
|
|