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

Unified Diff: src/js/messages.js

Issue 2206183002: Move ErrorToString to runtime (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@port-no-sideeffect-to-string
Patch Set: Rebase Created 4 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/debug/mirrors.js ('k') | src/js/prologue.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index 166643ff75f256494b75e360214867a32a279999..ea979f6e208b58a426cae1e94db725c38a31237d 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -115,22 +115,6 @@ utils.SetUpLockedPrototype(Script, [
// ----------------------------------------------------------------------------
// Error implementation
-function ErrorToString() {
- if (!IS_RECEIVER(this)) {
- throw MakeTypeError(kCalledOnNonObject, "Error.prototype.toString");
- }
-
- var name = this.name;
- name = IS_UNDEFINED(name) ? "Error" : TO_STRING(name);
-
- var message = this.message;
- message = IS_UNDEFINED(message) ? "" : TO_STRING(message);
-
- if (name == "") return message;
- if (message == "") return name;
- return `${name}: ${message}`
-}
-
function MakeError(type, arg0, arg1, arg2) {
return MakeGenericError(GlobalError, type, arg0, arg1, arg2);
}
@@ -160,7 +144,6 @@ function MakeURIError() {
]);
utils.Export(function(to) {
- to.ErrorToString = ErrorToString;
to.MakeError = MakeError;
to.MakeRangeError = MakeRangeError;
to.MakeSyntaxError = MakeSyntaxError;
« no previous file with comments | « src/debug/mirrors.js ('k') | src/js/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698