Takes the script offset into account when obtaining the column of the message.

R=jochen@chromium.org,yangguo@chromium.org

Review URL: https://codereview.chromium.org/1231663007

Cr-Commit-Position: refs/heads/master@{#29761}
This commit is contained in:
epertoso 2015-07-20 08:56:11 -07:00 committed by Commit bot
parent 4e263bc581
commit 6a5285108b

View File

@ -542,7 +542,7 @@ utils.SetUpLockedPrototype(SourceSlice,
function GetPositionInLine(message) { function GetPositionInLine(message) {
var script = %MessageGetScript(message); var script = %MessageGetScript(message);
var start_position = %MessageGetStartPosition(message); var start_position = %MessageGetStartPosition(message);
var location = script.locationFromPosition(start_position, false); var location = script.locationFromPosition(start_position, true);
if (location == null) return -1; if (location == null) return -1;
return location.column; return location.column;
} }