Skip to content

Commit 6e1407c

Browse files
jeisingerjasnell
authored andcommitted
deps: backport 4fdf9fd4813 from upstream v8
Original commit message: Add documentation for FunctionCallbackInfo [email protected],[email protected],[email protected] BUG= Change-Id: I273f5ce305f80b2aa5e9c8c42a6e8e5afc51a0a7 Reviewed-on: https://chromium-review.googlesource.com/484422 Reviewed-by: Kentaro Hara <[email protected]> Reviewed-by: Toon Verwaest <[email protected]> Commit-Queue: Jochen Eisinger <[email protected]> Cr-Commit-Position: refs/heads/master@{#44927} Ref: v8/v8@4fdf9fd4813 PR-URL: #12875 Reviewed-By: James M Snell <[email protected]>
1 parent f118f7a commit 6e1407c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

deps/v8/include/v8.h

+23-1
Original file line numberDiff line numberDiff line change
@@ -3480,16 +3480,34 @@ class ReturnValue {
34803480
template<typename T>
34813481
class FunctionCallbackInfo {
34823482
public:
3483+
/** The number of available arguments. */
34833484
V8_INLINE int Length() const;
3485+
/** Accessor for the available arguments. */
34843486
V8_INLINE Local<Value> operator[](int i) const;
34853487
V8_INLINE V8_DEPRECATED("Use Data() to explicitly pass Callee instead",
34863488
Local<Function> Callee() const);
3489+
/** Returns the receiver. This corresponds to the "this" value. */
34873490
V8_INLINE Local<Object> This() const;
3491+
/**
3492+
* If the callback was created without a Signature, this is the same
3493+
* value as This(). If there is a signature, and the signature didn't match
3494+
* This() but one of its hidden prototypes, this will be the respective
3495+
* hidden prototype.
3496+
*
3497+
* Note that this is not the prototype of This() on which the accessor
3498+
* referencing this callback was found (which in V8 internally is often
3499+
* referred to as holder [sic]).
3500+
*/
34883501
V8_INLINE Local<Object> Holder() const;
3502+
/** For construct calls, this returns the "new.target" value. */
34893503
V8_INLINE Local<Value> NewTarget() const;
3504+
/** Indicates whether this is a regular call or a construct call. */
34903505
V8_INLINE bool IsConstructCall() const;
3506+
/** The data argument specified when creating the callback. */
34913507
V8_INLINE Local<Value> Data() const;
3508+
/** The current Isolate. */
34923509
V8_INLINE Isolate* GetIsolate() const;
3510+
/** The ReturnValue for the call. */
34933511
V8_INLINE ReturnValue<T> GetReturnValue() const;
34943512
// This shouldn't be public, but the arm compiler needs it.
34953513
static const int kArgsLength = 8;
@@ -5562,9 +5580,13 @@ class V8_EXPORT ObjectTemplate : public Template {
55625580
friend class FunctionTemplate;
55635581
};
55645582

5565-
55665583
/**
55675584
* A Signature specifies which receiver is valid for a function.
5585+
*
5586+
* A receiver matches a given signature if the receiver (or any of its
5587+
* hidden prototypes) was created from the signature's FunctionTemplate, or
5588+
* from a FunctionTemplate that inherits directly or indirectly from the
5589+
* signature's FunctionTemplate.
55685590
*/
55695591
class V8_EXPORT Signature : public Data {
55705592
public:

0 commit comments

Comments
 (0)