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

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
« no previous file with comments | « src/debug/debug.cc ('k') | src/inspector/js_protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-interface.h
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h
index 77bab3a50c6336a780394fd068c9febfcad6af83..443ed4232fe436b9f815895a29fe1d19ab41394c 100644
--- a/src/debug/debug-interface.h
+++ b/src/debug/debug-interface.h
@@ -141,6 +141,27 @@ class DebugInterface {
static void ClearStepping(Isolate* isolate);
/**
+ * Defines location inside script.
+ * Lines and columns are 0-based.
+ */
+ class Location {
+ public:
+ Location(int lineNumber, int columnNumber);
+ /**
+ * Create empty location.
+ */
+ Location();
+
+ int GetLineNumber() const;
+ int GetColumnNumber() const;
+ bool IsEmpty() const;
+
+ private:
+ int lineNumber_;
+ int columnNumber_;
+ };
+
+ /**
* Native wrapper around v8::internal::Script object.
*/
class Script {
@@ -158,6 +179,8 @@ class DebugInterface {
MaybeLocal<String> SourceMappingURL() const;
MaybeLocal<String> ContextData() const;
MaybeLocal<String> Source() const;
+ bool GetPossibleBreakpoints(const Location& start, const Location& end,
+ std::vector<Location>* locations) const;
/**
* script parameter is a wrapper v8::internal::JSObject for
@@ -169,6 +192,9 @@ class DebugInterface {
*/
static MaybeLocal<Script> Wrap(Isolate* isolate,
v8::Local<v8::Object> script);
+
+ private:
+ int GetSourcePosition(const Location& location) const;
};
/**
« no previous file with comments | « src/debug/debug.cc ('k') | src/inspector/js_protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698