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

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

Issue 1677483002: Always load data for access check callbacks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « src/isolate.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 fe577457b0ec992d0edde5420ac7ee67c97e34f8..1f4fbd1bb5b9217c971be695d188e6f7120a49f3 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -8942,6 +8942,8 @@ static bool SecurityTestCallback(Local<v8::Context> accessing_context,
Local<v8::Object> accessed_object,
Local<v8::Value> data) {
printf("a\n");
+ CHECK(!data.IsEmpty() && data->IsInt32());
+ CHECK_EQ(42, data->Int32Value(accessing_context).FromJust());
return g_security_callback_result;
}
@@ -8952,7 +8954,7 @@ TEST(SecurityHandler) {
v8::HandleScope scope0(isolate);
v8::Local<v8::ObjectTemplate> global_template =
v8::ObjectTemplate::New(isolate);
- global_template->SetAccessCheckCallback(SecurityTestCallback);
+ global_template->SetAccessCheckCallback(SecurityTestCallback, v8_num(42));
// Create an environment
v8::Local<Context> context0 = Context::New(isolate, NULL, global_template);
context0->Enter();
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698