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

Unified Diff: src/runtime.cc

Issue 2883042: Breakpoint position should be inside function body. (Closed)
Patch Set: Created 10 years, 5 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/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 4063a0fc7d751aa86c4fd47ab46b2e1e9d05bcf9..4b14643952d4dcce07a6d149555f4d7d52df1595 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -9387,13 +9387,6 @@ static Object* Runtime_SetScriptBreakPoint(Arguments args) {
}
Debug::SetBreakPoint(shared, break_point_object_arg, &position);
position += shared->start_position();
-
- // The result position may become beyond script source end.
- // This is expected when the function is toplevel. This may become
- // a problem later when actual position gets converted into line/column.
- if (shared->is_toplevel() && position == shared->end_position()) {
- position = shared->end_position() - 1;
- }
return Smi::FromInt(position);
}
return Heap::undefined_value();

Powered by Google App Engine
This is Rietveld 408576698