Skip to content

Commit 83636a4

Browse files
jeisingeraddaleax
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 65956e6 commit 83636a4

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
@@ -3578,16 +3578,34 @@ class ReturnValue {
35783578
template<typename T>
35793579
class FunctionCallbackInfo {
35803580
public:
3581+
/** The number of available arguments. */
35813582
V8_INLINE int Length() const;
3583+
/** Accessor for the available arguments. */
35823584
V8_INLINE Local<Value> operator[](int i) const;
35833585
V8_INLINE V8_DEPRECATED("Use Data() to explicitly pass Callee instead",
35843586
Local<Function> Callee() const);
3587+
/** Returns the receiver. This corresponds to the "this" value. */
35853588
V8_INLINE Local<Object> This() const;
3589+
/**
3590+
* If the callback was created without a Signature, this is the same
3591+
* value as This(). If there is a signature, and the signature didn't match
3592+
* This() but one of its hidden prototypes, this will be the respective
3593+
* hidden prototype.
3594+
*
3595+
* Note that this is not the prototype of This() on which the accessor
3596+
* referencing this callback was found (which in V8 internally is often
3597+
* referred to as holder [sic]).
3598+
*/
35863599
V8_INLINE Local<Object> Holder() const;
3600+
/** For construct calls, this returns the "new.target" value. */
35873601
V8_INLINE Local<Value> NewTarget() const;
3602+
/** Indicates whether this is a regular call or a construct call. */
35883603
V8_INLINE bool IsConstructCall() const;
3604+
/** The data argument specified when creating the callback. */
35893605
V8_INLINE Local<Value> Data() const;
3606+
/** The current Isolate. */
35903607
V8_INLINE Isolate* GetIsolate() const;
3608+
/** The ReturnValue for the call. */
35913609
V8_INLINE ReturnValue<T> GetReturnValue() const;
35923610
// This shouldn't be public, but the arm compiler needs it.
35933611
static const int kArgsLength = 8;
@@ -5745,9 +5763,13 @@ class V8_EXPORT ObjectTemplate : public Template {
57455763
friend class FunctionTemplate;
57465764
};
57475765

5748-
57495766
/**
57505767
* A Signature specifies which receiver is valid for a function.
5768+
*
5769+
* A receiver matches a given signature if the receiver (or any of its
5770+
* hidden prototypes) was created from the signature's FunctionTemplate, or
5771+
* from a FunctionTemplate that inherits directly or indirectly from the
5772+
* signature's FunctionTemplate.
57515773
*/
57525774
class V8_EXPORT Signature : public Data {
57535775
public:

0 commit comments

Comments
 (0)