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

Unified Diff: src/messages.js

Issue 1132513003: Call builtin code wrapped in functions from the bootstrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix extra natives Created 5 years, 7 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/math.js ('k') | src/object-observe.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 2cc61574d1e79385e3352c38a09b9ae8b3da482a..20396f8b5a46a22b01cfb9e139bdf884cb6af8b3 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -31,7 +31,7 @@ var MakeReferenceErrorEmbedded;
var MakeSyntaxErrorEmbedded;
var MakeTypeErrorEmbedded;
-(function() {
+(function(global, shared, exports) {
%CheckIsBootstrapping();
@@ -1051,7 +1051,7 @@ var captureStackTrace = function captureStackTrace(obj, cons_opt) {
// Define special error type constructors.
-function DefineError(f) {
+function DefineError(global, f) {
// Store the error function in both the global object
// and the runtime object. The function is fetched
// from the runtime object when throwing errors from
@@ -1094,13 +1094,13 @@ function DefineError(f) {
return f;
};
-GlobalError = DefineError(function Error() { });
-GlobalEvalError = DefineError(function EvalError() { });
-GlobalRangeError = DefineError(function RangeError() { });
-GlobalReferenceError = DefineError(function ReferenceError() { });
-GlobalSyntaxError = DefineError(function SyntaxError() { });
-GlobalTypeError = DefineError(function TypeError() { });
-GlobalURIError = DefineError(function URIError() { });
+GlobalError = DefineError(global, function Error() { });
+GlobalEvalError = DefineError(global, function EvalError() { });
+GlobalRangeError = DefineError(global, function RangeError() { });
+GlobalReferenceError = DefineError(global, function ReferenceError() { });
+GlobalSyntaxError = DefineError(global, function SyntaxError() { });
+GlobalTypeError = DefineError(global, function TypeError() { });
+GlobalURIError = DefineError(global, function URIError() { });
GlobalError.captureStackTrace = captureStackTrace;
@@ -1236,4 +1236,4 @@ $stackOverflowBoilerplate = MakeRangeError(kStackOverflow);
%DefineAccessorPropertyUnchecked($stackOverflowBoilerplate, 'stack',
StackTraceGetter, StackTraceSetter, DONT_ENUM);
-})();
+})
« no previous file with comments | « src/math.js ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698