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

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

Issue 2685163006: [inspector] migrate set/remove BreakPoint to debug-interface.h (Closed)
Patch Set: added a test, ready for review 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/debug/debug-interface.h
diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h
index f76f4020fb3ca9c0d1b9000c289dde8b871b47dc..868998bf55a6221a071e98c3c097c69055419752 100644
--- a/src/debug/debug-interface.h
+++ b/src/debug/debug-interface.h
@@ -107,6 +107,19 @@ void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback,
void* data);
/**
+ * Native wrapper around v8::internal::BreakPoint object.
+ */
+class BreakPoint {
+ public:
+ static Local<BreakPoint> New(Isolate* isolate, Local<Value> condition,
+ Local<Value> data);
+ static MaybeLocal<BreakPoint> Cast(Isolate* isolate,
+ v8::Local<v8::Value> break_point);
+
+ v8::Local<v8::Value> Data() const;
+};
+
+/**
* Native wrapper around v8::internal::Script object.
*/
class Script {
@@ -129,11 +142,15 @@ class Script {
bool GetPossibleBreakpoints(const debug::Location& start,
const debug::Location& end,
std::vector<debug::Location>* locations) const;
+ debug::Location SetBreakPoint(const debug::Location& position,
+ Local<debug::BreakPoint> break_point) const;
private:
int GetSourcePosition(const debug::Location& location) const;
};
+void ClearBreakPoint(v8::Isolate* isolate, Local<BreakPoint> break_point);
+
// Specialization for wasm Scripts.
class WasmScript : public Script {
public:

Powered by Google App Engine
This is Rietveld 408576698