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

Unified Diff: src/objects.cc

Issue 2238893002: [debugger] separate break point info from code instrumentation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 4 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
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index da71f32717232480d8ac48301ca9babc04a8d46b..b133ee3f75c6d71e04370b8b61617f34fb90af6c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -18490,21 +18490,25 @@ Object* DebugInfo::GetBreakPointInfo(int source_position) {
return isolate->heap()->undefined_value();
}
-// Clear a break point at the specified source_position.
-void DebugInfo::ClearBreakPoint(Handle<DebugInfo> debug_info,
- int source_position,
+bool DebugInfo::ClearBreakPoint(Handle<DebugInfo> debug_info,
Handle<Object> break_point_object) {
Isolate* isolate = debug_info->GetIsolate();
- Handle<Object> break_point_info(
- debug_info->GetBreakPointInfo(source_position), isolate);
- if (break_point_info->IsUndefined(isolate)) return;
- BreakPointInfo::ClearBreakPoint(
- Handle<BreakPointInfo>::cast(break_point_info),
- break_point_object);
+ if (debug_info->break_points()->IsUndefined(isolate)) return false;
+
+ for (int i = 0; i < debug_info->break_points()->length(); i++) {
+ if (debug_info->break_points()->get(i)->IsUndefined(isolate)) continue;
+ Handle<BreakPointInfo> break_point_info = Handle<BreakPointInfo>(
+ BreakPointInfo::cast(debug_info->break_points()->get(i)), isolate);
+ if (BreakPointInfo::HasBreakPointObject(break_point_info,
+ break_point_object)) {
+ BreakPointInfo::ClearBreakPoint(break_point_info, break_point_object);
+ return true;
+ }
+ }
+ return false;
}
void DebugInfo::SetBreakPoint(Handle<DebugInfo> debug_info, int source_position,
- int statement_position,
Handle<Object> break_point_object) {
Isolate* isolate = debug_info->GetIsolate();
Handle<Object> break_point_info(
« no previous file with comments | « src/objects.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698