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

Unified Diff: include/v8.h

Issue 2531653002: [api] Support sharing prototypes between FunctionTemplates (Closed)
Patch Set: fixing test Created 4 years, 1 month 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 ccac0244da949d0f762b0411c4c24e5f60f5c8a8..83bb67a9b1d8dfc88a10aac1998816eec0f00826 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5134,7 +5134,11 @@ class V8_EXPORT FunctionTemplate : public Template {
/** Get the InstanceTemplate. */
Local<ObjectTemplate> InstanceTemplate();
- /** Causes the function template to inherit from a parent function template.*/
+ /**
+ * Causes the function template to inherit from a parent function template.
+ * This means the the function's prototype.__proto__ is set to the parent
+ * function's prototype.
+ **/
void Inherit(Local<FunctionTemplate> parent);
/**
@@ -5144,6 +5148,14 @@ class V8_EXPORT FunctionTemplate : public Template {
Local<ObjectTemplate> PrototypeTemplate();
/**
+ * A PrototypeProviderTemplate is another function template whose prototype
+ * property is used for this template. This is mutually exclusive with setting
+ * a prototype template indirectly by calling PrototypeTemplate() or using
+ * Inherit().
+ **/
+ void SetPrototypeProviderTemplate(Local<FunctionTemplate> prototype_provider);
+
+ /**
* Set the class name of the FunctionTemplate. This is used for
* printing objects created with the function created from the
* FunctionTemplate as its constructor.
« 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