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

Unified Diff: include/v8.h

Issue 7331035: Implement API functions for handling the AccessorDescriptor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 fb10c71576da0a92963b4decfe4dde60067a34fb..92b8f520b318b79ecd9b6870dc1244d8ffbcaf91 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1457,6 +1457,22 @@ class Object : public Value {
PropertyAttribute attribute = None);
/**
+ * Defines the get/set properties of the property's
+ * AccessorDescriptor.
+ */
+ V8EXPORT bool DefineGetter(Handle<String> name, Handle<Value> fun);
+ V8EXPORT bool DefineSetter(Handle<String> name, Handle<Value> fun);
+
+ /**
+ * Returns a function which is binded to the property by the
+ * DefineGetter/Setter method.
+ * Returns undefined value if the AccessorDescriptor's get/set
+ * properties are not defined.
+ */
+ V8EXPORT Local<Value> LookupGetter(Handle<String> name);
+ V8EXPORT Local<Value> LookupSetter(Handle<String> name);
+
+ /**
* Returns an array containing the names of the enumerable properties
* of this object, including properties from prototype objects. The
* array returned by this method contains the same values as would
« 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