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

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

Issue 13741: Make sure that the API does not change templates pass in from the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
===================================================================
--- test/cctest/test-api.cc (revision 959)
+++ test/cctest/test-api.cc (working copy)
@@ -5447,6 +5447,24 @@
}
+// This tests that access check information remains on the global
+// object template when creating contexts.
+THREADED_TEST(AccessControlRepeatedContextCreation) {
+ v8::HandleScope handle_scope;
+ v8::Handle<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New();
+ global_template->SetAccessCheckCallbacks(NamedSetAccessBlocker,
+ IndexedSetAccessBlocker);
+ i::Handle<i::ObjectTemplateInfo> internal_template =
+ v8::Utils::OpenHandle(*global_template);
+ CHECK(!internal_template->constructor()->IsUndefined());
+ i::Handle<i::FunctionTemplateInfo> constructor(
+ i::FunctionTemplateInfo::cast(internal_template->constructor()));
+ CHECK(!constructor->access_check_info()->IsUndefined());
+ v8::Persistent<Context> context0 = Context::New(NULL, global_template);
+ CHECK(!constructor->access_check_info()->IsUndefined());
+}
+
+
static String::ExternalStringResource* SymbolCallback(const char* chars,
size_t length) {
uint16_t* buffer = i::NewArray<uint16_t>(length + 1);
« 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