| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Google Inc. All rights reserved. | 3 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 v8::Local<v8::debug::WasmScript> underlyingScript, String16 id, | 52 v8::Local<v8::debug::WasmScript> underlyingScript, String16 id, |
| 53 String16 url, String16 source); | 53 String16 url, String16 source); |
| 54 | 54 |
| 55 virtual ~V8DebuggerScript(); | 55 virtual ~V8DebuggerScript(); |
| 56 | 56 |
| 57 const String16& scriptId() const { return m_id; } | 57 const String16& scriptId() const { return m_id; } |
| 58 const String16& url() const { return m_url; } | 58 const String16& url() const { return m_url; } |
| 59 bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } | 59 bool hasSourceURL() const { return !m_sourceURL.isEmpty(); } |
| 60 const String16& sourceURL() const; | 60 const String16& sourceURL() const; |
| 61 virtual const String16& sourceMappingURL() const = 0; | 61 virtual const String16& sourceMappingURL() const = 0; |
| 62 virtual String16 source(v8::Isolate*) const { return m_source; } | 62 virtual String16 source() const { return m_source; } |
| 63 const String16& hash(v8::Isolate*) const; | 63 const String16& hash() const; |
| 64 int startLine() const { return m_startLine; } | 64 int startLine() const { return m_startLine; } |
| 65 int startColumn() const { return m_startColumn; } | 65 int startColumn() const { return m_startColumn; } |
| 66 int endLine() const { return m_endLine; } | 66 int endLine() const { return m_endLine; } |
| 67 int endColumn() const { return m_endColumn; } | 67 int endColumn() const { return m_endColumn; } |
| 68 int executionContextId() const { return m_executionContextId; } | 68 int executionContextId() const { return m_executionContextId; } |
| 69 virtual bool isLiveEdit() const = 0; | 69 virtual bool isLiveEdit() const = 0; |
| 70 virtual bool isModule() const = 0; | 70 virtual bool isModule() const = 0; |
| 71 | 71 |
| 72 void setSourceURL(const String16&); | 72 void setSourceURL(const String16&); |
| 73 virtual void setSourceMappingURL(const String16&) = 0; | 73 virtual void setSourceMappingURL(const String16&) = 0; |
| 74 virtual void setSource(v8::Local<v8::String> source) { | 74 virtual void setSource(v8::Local<v8::String> source) { |
| 75 m_source = toProtocolString(source); | 75 m_source = toProtocolString(source); |
| 76 std::vector<int> empty; |
| 77 m_lineEndings.swap(empty); |
| 76 } | 78 } |
| 77 | 79 |
| 80 String16 lineAt(int lineNumberWithOffset, int maxLength); |
| 81 |
| 78 virtual bool getPossibleBreakpoints( | 82 virtual bool getPossibleBreakpoints( |
| 79 const v8::debug::Location& start, const v8::debug::Location& end, | 83 const v8::debug::Location& start, const v8::debug::Location& end, |
| 80 std::vector<v8::debug::Location>* locations) = 0; | 84 std::vector<v8::debug::Location>* locations) = 0; |
| 81 virtual void resetBlackboxedStateCache() = 0; | 85 virtual void resetBlackboxedStateCache() = 0; |
| 82 | 86 |
| 83 protected: | 87 protected: |
| 88 virtual void calculateLineEndings() = 0; |
| 89 |
| 84 V8DebuggerScript(v8::Isolate*, String16 id, String16 url); | 90 V8DebuggerScript(v8::Isolate*, String16 id, String16 url); |
| 85 | 91 |
| 86 String16 m_id; | 92 String16 m_id; |
| 87 String16 m_url; | 93 String16 m_url; |
| 88 String16 m_sourceURL; | 94 String16 m_sourceURL; |
| 89 String16 m_source; | 95 String16 m_source; |
| 90 mutable String16 m_hash; | 96 mutable String16 m_hash; |
| 91 int m_startLine = 0; | 97 int m_startLine = 0; |
| 92 int m_startColumn = 0; | 98 int m_startColumn = 0; |
| 93 int m_endLine = 0; | 99 int m_endLine = 0; |
| 94 int m_endColumn = 0; | 100 int m_endColumn = 0; |
| 95 int m_executionContextId = 0; | 101 int m_executionContextId = 0; |
| 96 | 102 |
| 103 std::vector<int> m_lineEndings; |
| 104 |
| 97 v8::Isolate* m_isolate; | 105 v8::Isolate* m_isolate; |
| 98 | 106 |
| 99 private: | 107 private: |
| 100 DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript); | 108 DISALLOW_COPY_AND_ASSIGN(V8DebuggerScript); |
| 101 }; | 109 }; |
| 102 | 110 |
| 103 } // namespace v8_inspector | 111 } // namespace v8_inspector |
| 104 | 112 |
| 105 #endif // V8_INSPECTOR_V8DEBUGGERSCRIPT_H_ | 113 #endif // V8_INSPECTOR_V8DEBUGGERSCRIPT_H_ |
| OLD | NEW |