Index: test/cctest/test-api.cc |
=================================================================== |
--- test/cctest/test-api.cc (revision 10751) |
+++ test/cctest/test-api.cc (working copy) |
@@ -11050,27 +11050,26 @@ |
} |
-v8::Handle<v8::String> a; |
-v8::Handle<v8::String> h; |
+const char* a = "a"; |
Vyacheslav Egorov (Chromium)
2012/02/20 14:28:13
static const char* kPropertyA
fschneider
2012/02/22 11:27:50
Done.
|
+const char* h = "h"; |
Vyacheslav Egorov (Chromium)
2012/02/20 14:28:13
static const char* kPropertyB
fschneider
2012/02/22 11:27:50
Done.
|
static bool NamedGetAccessBlockAandH(Local<v8::Object> obj, |
Local<Value> name, |
v8::AccessType type, |
Local<Value> data) { |
- return !(name->Equals(a) || name->Equals(h)); |
+ if (!name->IsString()) return false; |
+ char buf[10]; |
+ Local<String>::Cast(name)->WriteAscii(buf, 0, 9); |
+ return !(strcmp(a, buf) == 0 || strcmp(h, buf) == 0); |
Vyacheslav Egorov (Chromium)
2012/02/20 14:28:13
->IsEqualTo(CStrVector(kPropertyA))
?
fschneider
2012/02/22 11:27:50
Done.
|
} |
-// TODO(1952): Enable this test for threading test once the underlying bug is |
-// fixed. |
-TEST(TurnOnAccessCheckAndRecompile) { |
+THREADED_TEST(TurnOnAccessCheckAndRecompile) { |
v8::HandleScope handle_scope; |
// Create an environment with access check to the global object disabled by |
// default. When the registered access checker will block access to properties |
- // a and h |
- a = v8_str("a"); |
- h = v8_str("h"); |
+ // a and h. |
v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New(); |
global_template->SetAccessCheckCallbacks(NamedGetAccessBlockAandH, |
IndexedGetAccessBlocker, |