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

Unified Diff: src/debug/debug-interface.h

Issue 2465553003: [inspector] added Debugger.getPossibleBreakpoints method (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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/debug/debug-interface.h
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h
index 77bab3a50c6336a780394fd068c9febfcad6af83..3e47cef3dc8c5ff95d86ee92c35dd294c65488cb 100644
--- a/src/debug/debug-interface.h
+++ b/src/debug/debug-interface.h
@@ -145,6 +145,27 @@ class DebugInterface {
*/
class Script {
public:
+ /**
+ * Defines location inside script.
+ * Lines and columns are 0-based.
+ */
+ class Location {
dgozman 2016/11/03 21:13:13 Move this outside of Script. We can also turn this
kozy 2016/11/03 22:17:13 Moved.
+ public:
+ Location(int lineNumber, int columnNumber);
+ /**
+ * Create empty location.
+ */
+ Location();
+
+ int GetLineNumber() const;
+ int GetColumnNumber() const;
+ bool IsEmpty() const;
+
+ private:
+ int lineNumber_;
+ int columnNumber_;
+ };
+
v8::Isolate* GetIsolate() const;
ScriptOriginOptions OriginOptions() const;
@@ -158,6 +179,11 @@ class DebugInterface {
MaybeLocal<String> SourceMappingURL() const;
MaybeLocal<String> ContextData() const;
MaybeLocal<String> Source() const;
+ /**
+ * lines and columns are 0-based.
dgozman 2016/11/03 21:13:13 This comment should be in Location.
kozy 2016/11/03 22:17:13 Removed.
+ */
+ bool GetPossibleBreakpoints(const Location& start, const Location& end,
+ std::vector<Location>* locations) const;
/**
* script parameter is a wrapper v8::internal::JSObject for
@@ -169,6 +195,9 @@ class DebugInterface {
*/
static MaybeLocal<Script> Wrap(Isolate* isolate,
v8::Local<v8::Object> script);
+
+ private:
+ int GetSourcePosition(const Location& location) const;
};
/**

Powered by Google App Engine
This is Rietveld 408576698