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

Unified Diff: src/runtime/runtime-internal.cc

Issue 1281833002: Rewrite Error.prototype.toString in C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test case 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/runtime/runtime.h ('k') | test/mjsunit/error-constructors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 66cb77f683ab1f1a15ef3aaafffd03966616f46d..4b992929400aad81b109ce23c2f1c4b34803d3e6 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -253,6 +253,18 @@ RUNTIME_FUNCTION(Runtime_MessageGetScript) {
}
+RUNTIME_FUNCTION(Runtime_ErrorToStringRT) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSObject, error, 0);
+ Handle<String> result;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, result,
+ isolate->error_tostring_helper()->Stringify(isolate, error));
+ return *result;
+}
+
+
RUNTIME_FUNCTION(Runtime_FormatMessageString) {
HandleScope scope(isolate);
DCHECK(args.length() == 4);
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/error-constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698