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

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

Issue 11316331: Pass Isolate to Local<T>::New() (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Isolate argument first Created 8 years 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 1dbc399479ed02dc2a7183a88b5bec1d32b97729..2fc54144ec9cef93175691d63f485169e5457451 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -2360,6 +2360,16 @@ THREADED_TEST(GlobalHandle) {
}
+THREADED_TEST(LocalHandle) {
+ v8::HandleScope scope;
+ v8::Local<String> local = v8::Local<String>::New(v8_str("str"));
+ CHECK_EQ(local->Length(), 3);
+
+ local = v8::Local<String>::New(v8::Isolate::GetCurrent(), v8_str("str"));
+ CHECK_EQ(local->Length(), 3);
+}
+
+
class WeakCallCounter {
public:
explicit WeakCallCounter(int id) : id_(id), number_of_weak_calls_(0) { }
« 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