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

Unified Diff: src/messages.js

Issue 1297803003: Revert of Remove property loads from js builtins objects from runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/isolate.cc ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index a111660bc44804d28d9700088fc45dd963396bc0..712dba428adc6b2c9c3750117a7bc87d62ff57a6 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -5,7 +5,12 @@
// -------------------------------------------------------------------
var $errorToString;
+var $getStackTraceLine;
var $internalErrorSymbol;
+var $messageGetPositionInLine;
+var $messageGetLineNumber;
+var $messageGetSourceLine;
+var $stackOverflowBoilerplate;
var $stackTraceSymbol;
var MakeError;
var MakeEvalError;
@@ -208,16 +213,6 @@
}
-//Returns the offset of the given position within the containing line.
-function GetColumnNumber(message) {
- var script = %MessageGetScript(message);
- var start_position = %MessageGetStartPosition(message);
- var location = script.locationFromPosition(start_position, true);
- if (location == null) return -1;
- return location.column;
-}
-
-
// Returns the source code line containing the given source
// position, or the empty string if the position is invalid.
function GetSourceLine(message) {
@@ -227,7 +222,6 @@
if (location == null) return "";
return location.sourceText();
}
-
/**
* Find a line number given a specific source position.
@@ -560,6 +554,17 @@
["script", "from_line", "to_line", "from_position", "to_position"],
["sourceText", SourceSliceSourceText]
);
+
+
+// Returns the offset of the given position within the containing
+// line.
+function GetPositionInLine(message) {
+ var script = %MessageGetScript(message);
+ var start_position = %MessageGetStartPosition(message);
+ var location = script.locationFromPosition(start_position, true);
+ if (location == null) return -1;
+ return location.column;
+}
function GetStackTraceLine(recv, fun, pos, isGlobal) {
@@ -1000,6 +1005,9 @@
['toString', ErrorToString]);
$errorToString = ErrorToString;
+$messageGetPositionInLine = GetPositionInLine;
+$messageGetLineNumber = GetLineNumber;
+$messageGetSourceLine = GetSourceLine;
MakeError = function(type, arg0, arg1, arg2) {
return MakeGenericError(GlobalError, type, arg0, arg1, arg2);
@@ -1023,8 +1031,8 @@
// Boilerplate for exceptions for stack overflows. Used from
// Isolate::StackOverflow().
-var StackOverflowBoilerplate = MakeRangeError(kStackOverflow);
-%DefineAccessorPropertyUnchecked(StackOverflowBoilerplate, 'stack',
+$stackOverflowBoilerplate = MakeRangeError(kStackOverflow);
+%DefineAccessorPropertyUnchecked($stackOverflowBoilerplate, 'stack',
StackTraceGetter, StackTraceSetter,
DONT_ENUM);
@@ -1051,10 +1059,6 @@
to.NoSideEffectToString = NoSideEffectToString;
to.ToDetailString = ToDetailString;
to.MakeError = MakeGenericError;
- to.MessageGetLineNumber = GetLineNumber;
- to.MessageGetColumnNumber = GetColumnNumber;
- to.MessageGetSourceLine = GetSourceLine;
- to.StackOverflowBoilerplate = StackOverflowBoilerplate;
});
});
« no previous file with comments | « src/isolate.cc ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698