Index: src/js/messages.js |
diff --git a/src/js/messages.js b/src/js/messages.js |
index 69d3fbb4f50c89cc03b0ee80c9c1abe7a53997ac..f8cb967cdd064238ebbe75bf50edc2be168271f6 100644 |
--- a/src/js/messages.js |
+++ b/src/js/messages.js |
@@ -37,6 +37,7 @@ |
var ObjectToString = utils.ImportNow("object_to_string"); |
var Script = utils.ImportNow("Script"); |
var stackTraceSymbol = utils.ImportNow("stack_trace_symbol"); |
+var StringCharAt; |
var StringIndexOf; |
var StringSubstring; |
var SymbolToString; |
@@ -56,6 +57,7 @@ |
Int8x16ToString = from.Int8x16ToString; |
ObjectDefineProperty = from.ObjectDefineProperty; |
ObjectHasOwnProperty = from.ObjectHasOwnProperty; |
+ StringCharAt = from.StringCharAt; |
StringIndexOf = from.StringIndexOf; |
StringSubstring = from.StringSubstring; |
SymbolToString = from.SymbolToString; |
@@ -253,7 +255,6 @@ |
return -1; |
} |
- |
/** |
* Get information on a specific source position. |
* @param {number} position The source position |
@@ -271,7 +272,7 @@ |
var line_ends = this.line_ends; |
var start = line == 0 ? 0 : line_ends[line - 1] + 1; |
var end = line_ends[line]; |
- if (end > 0 && %_StringCharAt(this.source, end - 1) === '\r') { |
+ if (end > 0 && %_Call(StringCharAt, this.source, end - 1) == '\r') { |
end--; |
} |
var column = position - start; |