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

Unified Diff: include/v8.h

Issue 6902108: Implement CallAsConstructor method for Object in the API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add exception handling and some new test cases Created 9 years, 8 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') | src/api.cc » ('J')
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 78ee7e6a0b63396da9262534a8696838f7e99b8f..c9c241f85692dabc87606e47231b1c389ad93a80 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1613,6 +1613,14 @@ class Object : public Value {
V8EXPORT Local<Value> CallAsFunction(Handle<Object> recv,
int argc,
Handle<Value> argv[]);
+ /**
+ * Call an Object as a consturctor if a callback is set by the
+ * ObjectTemplate::SetCallAsFunctionHandler method.
+ * Note: This method behaves like the Function::NewInstance method.
+ */
+ V8EXPORT Local<Object> CallAsConstructor(
+ int argc,
+ Handle<Value> argv[]) const;
Mads Ager (chromium) 2011/05/05 09:03:33 I would remove the const here for consistency with
V8EXPORT static Local<Object> New();
static inline Object* Cast(Value* obj);
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698