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

Unified Diff: src/d8.cc

Issue 1393713006: Don't compile functions in a context the caller doesn't have access to (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | src/generator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index b73ab0bd6a6be5b171a1c1258d65e05c0c8f079f..d567cef6fa28862442c9279d960877d5a6237448 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -140,6 +140,17 @@ Worker* GetWorkerFromInternalField(Isolate* isolate, Local<Object> object) {
#endif // !V8_SHARED
+bool NamedAccessCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key,
+ v8::AccessType type, v8::Local<v8::Value> data) {
+ return false;
+}
+
+
+bool IndexedAccessCheck(v8::Local<v8::Object> host, uint32_t index,
+ v8::AccessType type, v8::Local<v8::Value> data) {
+ return false;
+}
+
} // namespace
@@ -1178,6 +1189,9 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
.ToLocalChecked(),
os_templ);
+ global_template->SetAccessCheckCallbacks(NamedAccessCheck,
+ IndexedAccessCheck);
+
return global_template;
}
« no previous file with comments | « no previous file | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698