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

Unified Diff: include/v8.h

Issue 11802003: Add API for access checks on observed objects (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index b35500dd5e3712f843ad8847cef404a40eb0896a..41e59de1cdbcc7e8bfa433ca38f2f204a878492d 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -2205,6 +2205,15 @@ typedef bool (*IndexedSecurityCallback)(Local<Object> host,
/**
+ * Returns true if cross-context access should be allowed to
+ * observe data property mutations on the given host object.
+ *
+ * Only called when the --harmony-observation switch is enabled.
+ */
+typedef bool (*ObserveSecurityCallback)(Local<Object> host, Local<Value> data);
+
+
+/**
* A FunctionTemplate is used to create functions at runtime. There
* can only be one function created from a FunctionTemplate in a
* context. The lifetime of the created function is equal to the
@@ -2523,6 +2532,15 @@ class V8EXPORT ObjectTemplate : public Template {
*/
void SetAccessCheckCallbacks(NamedSecurityCallback named_handler,
IndexedSecurityCallback indexed_handler,
+ ObserveSecurityCallback observe_handler,
+ Handle<Value> data = Handle<Value>(),
+ bool turned_on_by_default = true);
+
+ /**
+ * Deprecated, call the 5-argument version instead.
+ */
+ void SetAccessCheckCallbacks(NamedSecurityCallback named_handler,
+ IndexedSecurityCallback indexed_handler,
Handle<Value> data = Handle<Value>(),
bool turned_on_by_default = true);
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698