Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index d31ef5405cfaf5c0fb7bbd419b73c50b715ca3a9..55b4e22256278f33116e9426782a30bf25b2ae5f 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -2289,7 +2289,8 @@ class V8EXPORT FunctionTemplate : public Template { |
AccessorSetter setter, |
Handle<Value> data, |
AccessControl settings, |
- PropertyAttribute attributes); |
+ PropertyAttribute attributes, |
+ Handle<FunctionTemplate> constructor); |
void SetNamedInstancePropertyHandler(NamedPropertyGetter getter, |
NamedPropertySetter setter, |
NamedPropertyQuery query, |
@@ -2347,13 +2348,19 @@ class V8EXPORT ObjectTemplate : public Template { |
* cross-context access. |
* \param attribute The attributes of the property for which an accessor |
* is added. |
+ * \param constructor The constructor used to perform an implicit instance |
+ * check against. If the receiver is incompatible (i.e. is not an instance |
+ * of the constructor as defined by FunctionTemplate::HasInstance()), an |
+ * implicit TypeError is thrown and no callback is invoked. |
*/ |
void SetAccessor(Handle<String> name, |
AccessorGetter getter, |
AccessorSetter setter = 0, |
Handle<Value> data = Handle<Value>(), |
AccessControl settings = DEFAULT, |
- PropertyAttribute attribute = None); |
+ PropertyAttribute attribute = None, |
+ Handle<FunctionTemplate> constructor = |
Michael Starzinger
2012/06/01 13:19:43
As discussed offline, we might want to wrap this F
Michael Starzinger
2012/06/04 11:34:34
Done.
|
+ Handle<FunctionTemplate>()); |
/** |
* Sets a named property handler on the object template. |