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

Unified Diff: src/messages.js

Issue 43130: Fix the handling of line offset when getting the source line from a ScriptMirror (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/debug-delay.js ('k') | src/mirror-delay.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
===================================================================
--- src/messages.js (revision 1480)
+++ src/messages.js (working copy)
@@ -302,7 +302,7 @@
var offset_position = opt_offset_position || 0;
if (line < 0 || column < 0 || offset_position < 0) return null;
if (line == 0) {
- return this.locationFromPosition(offset_position + column);
+ return this.locationFromPosition(offset_position + column, false);
} else {
// Find the line where the offset position is located
var lineCount = this.lineCount();
@@ -519,7 +519,7 @@
// Returns the offset of the given position within the containing
// line.
function GetPositionInLine(message) {
- var location = message.script.locationFromPosition(message.startPos);
+ var location = message.script.locationFromPosition(message.startPos, false);
if (location == null) return -1;
location.restrict();
return message.startPos - location.start;
« no previous file with comments | « src/debug-delay.js ('k') | src/mirror-delay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698