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

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

Issue 78093005: Revert r17907 - Make it possible to add more than one piece of embedder data to isolates (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 63e806d364841474cc195359e08a6eedb8c696ee..6a75cd72dbf890ddbefc7e8ae9a460a74e7b6f8c 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -19937,28 +19937,16 @@ UNINITIALIZED_TEST(IsolateEmbedderData) {
v8::Isolate* isolate = v8::Isolate::New();
isolate->Enter();
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
- for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
- CHECK_EQ(NULL, isolate->GetData(slot));
- CHECK_EQ(NULL, i_isolate->GetData(slot));
- }
- for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
- void* data = reinterpret_cast<void*>(0xacce55ed + slot);
- isolate->SetData(slot, data);
- }
- for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
- void* data = reinterpret_cast<void*>(0xacce55ed + slot);
- CHECK_EQ(data, isolate->GetData(slot));
- CHECK_EQ(data, i_isolate->GetData(slot));
- }
- for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
- void* data = reinterpret_cast<void*>(0xdecea5ed + slot);
- isolate->SetData(slot, data);
- }
- for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
- void* data = reinterpret_cast<void*>(0xdecea5ed + slot);
- CHECK_EQ(data, isolate->GetData(slot));
- CHECK_EQ(data, i_isolate->GetData(slot));
- }
+ CHECK_EQ(NULL, isolate->GetData());
+ CHECK_EQ(NULL, i_isolate->GetData());
+ static void* data1 = reinterpret_cast<void*>(0xacce55ed);
+ isolate->SetData(data1);
+ CHECK_EQ(data1, isolate->GetData());
+ CHECK_EQ(data1, i_isolate->GetData());
+ static void* data2 = reinterpret_cast<void*>(0xdecea5ed);
+ i_isolate->SetData(data2);
+ CHECK_EQ(data2, isolate->GetData());
+ CHECK_EQ(data2, i_isolate->GetData());
isolate->Exit();
isolate->Dispose();
}
« 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