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

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

Issue 9425048: Enable test-api/TurnOnAccessCheckAndRecompile and change it so it can't cause a GC. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 10 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/cctest.status ('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
===================================================================
--- 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,
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698