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

Unified Diff: test/cctest/test-api.cc

Issue 1510173002: Revert of Make Error.prototype.toString spec compliant; and fix various side-effect-free error printing metho… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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-internal.cc ('k') | test/mjsunit/error-constructors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index c5171e8cbf260e057da06dbd0fd3580d5f13db98..bd26f9277b4ad4d5142ad6e8daf65e5f264b582a 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -5612,7 +5612,7 @@
static void check_custom_error_tostring(v8::Local<v8::Message> message,
v8::Local<v8::Value> data) {
- const char* uncaught_error = "Uncaught my name: my message";
+ const char* uncaught_error = "Uncaught MyError toString";
CHECK(message->Get()
->Equals(CcTest::isolate()->GetCurrentContext(),
v8_str(uncaught_error))
@@ -5630,6 +5630,9 @@
" this.message = message; "
"} "
"MyError.prototype = Object.create(Error.prototype); "
+ "MyError.prototype.toString = function() { "
+ " return 'MyError toString'; "
+ "}; "
"throw new MyError('my name', 'my message'); ");
context->GetIsolate()->RemoveMessageListeners(check_custom_error_tostring);
}
@@ -5691,7 +5694,7 @@
static void check_custom_rethrowing_message(v8::Local<v8::Message> message,
v8::Local<v8::Value> data) {
- const char* uncaught_error = "Uncaught [object Object]";
+ const char* uncaught_error = "Uncaught exception";
CHECK(message->Get()
->Equals(CcTest::isolate()->GetCurrentContext(),
v8_str(uncaught_error))
« no previous file with comments | « src/runtime/runtime-internal.cc ('k') | test/mjsunit/error-constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698