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

Unified Diff: src/runtime.cc

Issue 3074004: Backport http://code.google.com/p/v8/source/detail?r=5131 to 2.2. (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.2/
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
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
===================================================================
--- src/runtime.cc (revision 5138)
+++ src/runtime.cc (working copy)
@@ -9344,6 +9344,13 @@
}
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();
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698