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

Unified Diff: src/messages.js

Issue 1295093002: Do not use js builtins object when constructing an error. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix failures. 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/messages.cc ('k') | src/pending-compilation-error-handler.cc » ('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 5601db63a299250bd4832f512a4aa63077b56c6b..712dba428adc6b2c9c3750117a7bc87d62ff57a6 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -172,7 +172,6 @@ function ToDetailString(obj) {
function MakeGenericError(constructor, type, arg0, arg1, arg2) {
- if (IS_UNDEFINED(arg0) && IS_STRING(type)) arg0 = [];
var error = new constructor(FormatMessage(type, arg0, arg1, arg2));
error[$internalErrorSymbol] = true;
return error;
@@ -1014,18 +1013,10 @@ MakeError = function(type, arg0, arg1, arg2) {
return MakeGenericError(GlobalError, type, arg0, arg1, arg2);
}
-MakeEvalError = function(type, arg0, arg1, arg2) {
- return MakeGenericError(GlobalEvalError, type, arg0, arg1, arg2);
-}
-
MakeRangeError = function(type, arg0, arg1, arg2) {
return MakeGenericError(GlobalRangeError, type, arg0, arg1, arg2);
}
-MakeReferenceError = function(type, arg0, arg1, arg2) {
- return MakeGenericError(GlobalReferenceError, type, arg0, arg1, arg2);
-}
-
MakeSyntaxError = function(type, arg0, arg1, arg2) {
return MakeGenericError(GlobalSyntaxError, type, arg0, arg1, arg2);
}
@@ -1067,6 +1058,7 @@ utils.ExportToRuntime(function(to) {
to.GetStackTraceLine = GetStackTraceLine;
to.NoSideEffectToString = NoSideEffectToString;
to.ToDetailString = ToDetailString;
+ to.MakeError = MakeGenericError;
});
});
« no previous file with comments | « src/messages.cc ('k') | src/pending-compilation-error-handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698