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

Unified Diff: test/cctest/test-global-handles.cc

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 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 | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-global-handles.cc
diff --git a/test/cctest/test-global-handles.cc b/test/cctest/test-global-handles.cc
index d25c236f57270c965cc16d5bd253da7818e2ad06..a274d7546cb0bf8508ab9a277532fa39651bb248 100644
--- a/test/cctest/test-global-handles.cc
+++ b/test/cctest/test-global-handles.cc
@@ -315,53 +315,3 @@ TEST(ImplicitReferences) {
ASSERT(implicit_refs->at(1)->length == 1);
ASSERT(implicit_refs->at(1)->children[0] == g2c1.location());
}
-
-
-TEST(EternalHandles) {
- CcTest::InitializeVM();
- Isolate* isolate = Isolate::Current();
- v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
- EternalHandles* eternals = isolate->eternal_handles();
-
- // Create a number of handles that will not be on a block boundary
- const int kArrayLength = 2048-1;
- int indices[kArrayLength];
-
- CHECK_EQ(0, eternals->NumberOfHandles());
- for (int i = 0; i < kArrayLength; i++) {
- HandleScope scope(isolate);
- v8::Local<v8::Object> object = v8::Object::New();
- object->Set(i, v8::Integer::New(i, v8_isolate));
- if (i % 2 == 0) {
- // Create with internal api
- indices[i] = eternals->Create(isolate, *v8::Utils::OpenHandle(*object));
- } else {
- // Create with external api
- indices[i] = object.Eternalize(v8_isolate);
- }
- }
-
- isolate->heap()->CollectAllAvailableGarbage();
-
- for (int i = 0; i < kArrayLength; i++) {
- for (int j = 0; j < 2; j++) {
- HandleScope scope(isolate);
- v8::Local<v8::Object> object;
- if (j == 0) {
- // Test internal api
- v8::Local<v8::Value> local =
- v8::Utils::ToLocal(eternals->Get(indices[i]));
- object = v8::Handle<v8::Object>::Cast(local);
- } else {
- // Test external api
- object = v8::Local<v8::Object>::GetEternal(v8_isolate, indices[i]);
- }
- v8::Local<v8::Value> value = object->Get(i);
- CHECK(value->IsInt32());
- CHECK_EQ(i, value->Int32Value());
- }
- }
-
- CHECK_EQ(kArrayLength, eternals->NumberOfHandles());
-}
-
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698