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

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

Issue 10196013: Make Isolate::GetData and Isolate::SetData inlineable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix presubmit failure in test case. Created 8 years, 8 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/api.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 ba836479109eb55918292074e84692286d05deda..6a5e6f89cad6e6641b3ed5126a484c1710e8393e 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -16504,3 +16504,21 @@ TEST(StaticGettersAfterDeath) {
CHECK(v8::False(isolate).IsEmpty());
CHECK_EQ(9, fatal_error_callback_counter);
}
+
+
+TEST(IsolateEmbedderData) {
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ CHECK_EQ(NULL, isolate->GetData());
+ CHECK_EQ(NULL, ISOLATE->GetData());
+ static void* data1 = reinterpret_cast<void*>(0xacce55ed);
+ isolate->SetData(data1);
+ CHECK_EQ(data1, isolate->GetData());
+ CHECK_EQ(data1, ISOLATE->GetData());
+ static void* data2 = reinterpret_cast<void*>(0xdecea5ed);
+ ISOLATE->SetData(data2);
+ CHECK_EQ(data2, isolate->GetData());
+ CHECK_EQ(data2, ISOLATE->GetData());
+ ISOLATE->TearDown();
+ CHECK_EQ(data2, isolate->GetData());
+ CHECK_EQ(data2, ISOLATE->GetData());
+}
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698