Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Unified Diff: src/inspector/v8-debugger-script.h

Issue 2671193002: [inspector] restore provisional breakpoints smarter (Closed)
Patch Set: removed flaky breakpointId from test results Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/inspector/v8-debugger-script.h
diff --git a/src/inspector/v8-debugger-script.h b/src/inspector/v8-debugger-script.h
index 9250c9d87291a3dbe3771b43ff21d7991d409931..efb6995d15e24631ef6aecb6284cc6d88cfb2f0d 100644
--- a/src/inspector/v8-debugger-script.h
+++ b/src/inspector/v8-debugger-script.h
@@ -59,8 +59,8 @@ class V8DebuggerScript {
bool hasSourceURL() const { return !m_sourceURL.isEmpty(); }
const String16& sourceURL() const;
virtual const String16& sourceMappingURL() const = 0;
- virtual String16 source(v8::Isolate*) const { return m_source; }
- const String16& hash(v8::Isolate*) const;
+ virtual String16 source() const { return m_source; }
+ const String16& hash() const;
int startLine() const { return m_startLine; }
int startColumn() const { return m_startColumn; }
int endLine() const { return m_endLine; }
@@ -73,8 +73,11 @@ class V8DebuggerScript {
virtual void setSourceMappingURL(const String16&) = 0;
virtual void setSource(v8::Local<v8::String> source) {
m_source = toProtocolString(source);
+ m_lineEndings.reset(nullptr);
}
+ String16 lineAt(int lineNumberWithOffset, int maxLength);
+
virtual bool getPossibleBreakpoints(
const v8::debug::Location& start, const v8::debug::Location& end,
std::vector<v8::debug::Location>* locations) = 0;
@@ -94,6 +97,8 @@ class V8DebuggerScript {
int m_endColumn = 0;
int m_executionContextId = 0;
+ std::unique_ptr<std::vector<size_t>> m_lineEndings;
+
v8::Isolate* m_isolate;
private:

Powered by Google App Engine
This is Rietveld 408576698