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

Unified Diff: gin/arguments.h

Issue 401823002: Added IsConstructorCall to gin::Arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit tests Created 6 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 | gin/arguments.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/arguments.h
diff --git a/gin/arguments.h b/gin/arguments.h
index 509c22ca14f892f3188348e6b1b9fae01b5caafa..96a3701aba2f2f39280d0f4210619bd10c4e8639 100644
--- a/gin/arguments.h
+++ b/gin/arguments.h
@@ -79,6 +79,10 @@ class GIN_EXPORT Arguments {
v8::Isolate* isolate() const { return isolate_; }
+ // Allows the function handler to distinguish between normal invocation
+ // and object construction.
+ bool IsConstructCall() const;
+
private:
v8::Isolate* isolate_;
const v8::FunctionCallbackInfo<v8::Value>* info_;
« no previous file with comments | « no previous file | gin/arguments.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698