Skip to content

Commit

Permalink
deps: backport 4fdf9fd4813 from upstream v8
Browse files Browse the repository at this point in the history
Original commit message:

    Add documentation for FunctionCallbackInfo

    R=verwaest@chromium.org,haraken@chromium.org,yukishiino@chromium.org
    BUG=

    Change-Id: I273f5ce305f80b2aa5e9c8c42a6e8e5afc51a0a7
    Reviewed-on: https://chromium-review.googlesource.com/484422
    Reviewed-by: Kentaro Hara <haraken@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Jochen Eisinger <jochen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#44927}

Ref: v8/v8@4fdf9fd4813

PR-URL: #12875
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
jeisinger authored and addaleax committed Jul 24, 2017
1 parent 65956e6 commit 83636a4
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -3578,16 +3578,34 @@ class ReturnValue {
template<typename T>
class FunctionCallbackInfo {
public:
/** The number of available arguments. */
V8_INLINE int Length() const;
/** Accessor for the available arguments. */
V8_INLINE Local<Value> operator[](int i) const;
V8_INLINE V8_DEPRECATED("Use Data() to explicitly pass Callee instead",
Local<Function> Callee() const);
/** Returns the receiver. This corresponds to the "this" value. */
V8_INLINE Local<Object> This() const;
/**
* If the callback was created without a Signature, this is the same
* value as This(). If there is a signature, and the signature didn't match
* This() but one of its hidden prototypes, this will be the respective
* hidden prototype.
*
* Note that this is not the prototype of This() on which the accessor
* referencing this callback was found (which in V8 internally is often
* referred to as holder [sic]).
*/
V8_INLINE Local<Object> Holder() const;
/** For construct calls, this returns the "new.target" value. */
V8_INLINE Local<Value> NewTarget() const;
/** Indicates whether this is a regular call or a construct call. */
V8_INLINE bool IsConstructCall() const;
/** The data argument specified when creating the callback. */
V8_INLINE Local<Value> Data() const;
/** The current Isolate. */
V8_INLINE Isolate* GetIsolate() const;
/** The ReturnValue for the call. */
V8_INLINE ReturnValue<T> GetReturnValue() const;
// This shouldn't be public, but the arm compiler needs it.
static const int kArgsLength = 8;
Expand Down Expand Up @@ -5745,9 +5763,13 @@ class V8_EXPORT ObjectTemplate : public Template {
friend class FunctionTemplate;
};


/**
* A Signature specifies which receiver is valid for a function.
*
* A receiver matches a given signature if the receiver (or any of its
* hidden prototypes) was created from the signature's FunctionTemplate, or
* from a FunctionTemplate that inherits directly or indirectly from the
* signature's FunctionTemplate.
*/
class V8_EXPORT Signature : public Data {
public:
Expand Down

0 comments on commit 83636a4

Please sign in to comment.