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

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

Issue 10911305: Replace r12503. Explicitly check toString() for exception in d8's print(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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/d8.cc ('k') | no next file » | 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 027c0d6c19ef32df4078bef0838d67c2b3bf903d..18025e14a076210b454a8cc4bcc2e7a3dd9d8f47 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -17513,37 +17513,4 @@ class ThreadInterruptTest {
THREADED_TEST(SemaphoreInterruption) {
ThreadInterruptTest().RunTest();
}
-
-
-TEST(Utf8ValueException) {
- v8::HandleScope scope;
- LocalContext context;
-
- Handle<Value> object = CompileRun(
- "var obj = { toString : function() { throw 'deadbeef'; } }; obj");
-
- { v8::TryCatch try_catch;
- v8::String::Utf8Value utf8_value(object);
- CHECK(try_catch.HasCaught());
- CHECK_EQ("deadbeef", *v8::String::Utf8Value(try_catch.Exception()));
- }
-
- { v8::TryCatch try_catch;
- v8::String::AsciiValue ascii_value(object);
- CHECK(try_catch.HasCaught());
- CHECK_EQ("deadbeef", *v8::String::Utf8Value(try_catch.Exception()));
- }
-
- { v8::TryCatch try_catch;
- v8::String::Value value(object);
- CHECK(try_catch.HasCaught());
- CHECK_EQ("deadbeef", *v8::String::Utf8Value(try_catch.Exception()));
- }
-
- // It should work fine without any TryCatch.
- v8::String::Utf8Value utf8_value(object);
- v8::String::AsciiValue ascii_value(object);
- v8::String::Value value(object);
-}
-
#endif // WIN32
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698