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

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

Issue 17068006: Remove IsInitialized checks from inlined API functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Sven Panne. Created 7 years, 6 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/isolate.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 a07d528e7276cb39cf7b5b3f8595dcaaf0249054..a59d44a98b7877a1a78c98f2d99d8d4878d941fc 100755
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -18782,13 +18782,6 @@ TEST(PrimaryStubCache) {
}
-static int fatal_error_callback_counter = 0;
-static void CountingErrorCallback(const char* location, const char* message) {
- printf("CountingErrorCallback(\"%s\", \"%s\")\n", location, message);
- fatal_error_callback_counter++;
-}
-
-
TEST(StaticGetters) {
LocalContext context;
i::Factory* factory = i::Isolate::Current()->factory();
@@ -18806,31 +18799,6 @@ TEST(StaticGetters) {
i::Handle<i::Object> false_value = factory->false_value();
CHECK(*v8::Utils::OpenHandle(*v8::False()) == *false_value);
CHECK(*v8::Utils::OpenHandle(*v8::False(isolate)) == *false_value);
-
- // Test after-death behavior.
- CHECK(i::Internals::IsInitialized(isolate));
- CHECK_EQ(0, fatal_error_callback_counter);
- v8::V8::SetFatalErrorHandler(CountingErrorCallback);
- v8::Utils::ReportApiFailure("StaticGetters()", "Kill V8");
- i::Isolate::Current()->TearDown();
- CHECK(!i::Internals::IsInitialized(isolate));
- CHECK_EQ(1, fatal_error_callback_counter);
- CHECK(v8::Undefined().IsEmpty());
- CHECK_EQ(2, fatal_error_callback_counter);
- CHECK(v8::Undefined(isolate).IsEmpty());
- CHECK_EQ(3, fatal_error_callback_counter);
- CHECK(v8::Null().IsEmpty());
- CHECK_EQ(4, fatal_error_callback_counter);
- CHECK(v8::Null(isolate).IsEmpty());
- CHECK_EQ(5, fatal_error_callback_counter);
- CHECK(v8::True().IsEmpty());
- CHECK_EQ(6, fatal_error_callback_counter);
- CHECK(v8::True(isolate).IsEmpty());
- CHECK_EQ(7, fatal_error_callback_counter);
- CHECK(v8::False().IsEmpty());
- CHECK_EQ(8, fatal_error_callback_counter);
- CHECK(v8::False(isolate).IsEmpty());
- CHECK_EQ(9, fatal_error_callback_counter);
}
@@ -18860,19 +18828,6 @@ TEST(StringEmpty) {
i::Handle<i::Object> empty_string = factory->empty_string();
CHECK(*v8::Utils::OpenHandle(*v8::String::Empty()) == *empty_string);
CHECK(*v8::Utils::OpenHandle(*v8::String::Empty(isolate)) == *empty_string);
-
- // Test after-death behavior.
- CHECK(i::Internals::IsInitialized(isolate));
- CHECK_EQ(0, fatal_error_callback_counter);
- v8::V8::SetFatalErrorHandler(CountingErrorCallback);
- v8::Utils::ReportApiFailure("StringEmpty()", "Kill V8");
- i::Isolate::Current()->TearDown();
- CHECK(!i::Internals::IsInitialized(isolate));
- CHECK_EQ(1, fatal_error_callback_counter);
- CHECK(v8::String::Empty().IsEmpty());
- CHECK_EQ(2, fatal_error_callback_counter);
- CHECK(v8::String::Empty(isolate).IsEmpty());
- CHECK_EQ(3, fatal_error_callback_counter);
}
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698