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

Side by Side Diff: test/cctest/test-api.cc

Issue 563723002: Expect requiring access check on objects with hidden properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 22998 matching lines...) Expand 10 before | Expand all | Expand 10 after
23009 v8::ObjectTemplate::New(isolate); 23009 v8::ObjectTemplate::New(isolate);
23010 object_template->SetAccessCheckCallbacks(NamedAccessCounter, 23010 object_template->SetAccessCheckCallbacks(NamedAccessCounter,
23011 IndexedAccessCounter); 23011 IndexedAccessCounter);
23012 23012
23013 v8::Handle<Context> context = Context::New(isolate); 23013 v8::Handle<Context> context = Context::New(isolate);
23014 v8::Context::Scope context_scope(context); 23014 v8::Context::Scope context_scope(context);
23015 23015
23016 context->Global()->Set(v8_str("o"), object_template->NewInstance()); 23016 context->Global()->Set(v8_str("o"), object_template->NewInstance());
23017 CompileRun("Object.getOwnPropertyNames(o)"); 23017 CompileRun("Object.getOwnPropertyNames(o)");
23018 } 23018 }
23019
23020
23021 TEST(GetHiddenPropertyTableAfterAccessCheck) {
23022 v8::Isolate* isolate = CcTest::isolate();
23023 v8::HandleScope handle_scope(isolate);
23024 v8::Handle<v8::ObjectTemplate> object_template =
23025 v8::ObjectTemplate::New(isolate);
23026 object_template->SetAccessCheckCallbacks(NamedAccessCounter,
23027 IndexedAccessCounter);
23028
23029 v8::Handle<Context> context = Context::New(isolate);
23030 v8::Context::Scope context_scope(context);
23031
23032 v8::Handle<v8::Object> obj = object_template->NewInstance();
23033 obj->Set(v8_str("key"), v8_str("value"));
23034 obj->Delete(v8_str("key"));
23035
23036 obj->SetHiddenValue(v8_str("hidden key 2"), v8_str("hidden value 2"));
23037 }
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698