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

Unified Diff: include/v8.h

Issue 1910253005: [api] Expose FunctionCallbackInfo::NewTarget (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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-arguments.h » ('j') | src/builtins.h » ('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 51fb1330614237fe6a1e735d9ff5d44798fd552e..30caf430782523f98b765a66147a3048fb7e7bed 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -3192,12 +3192,13 @@ class FunctionCallbackInfo {
Local<Function> Callee() const);
V8_INLINE Local<Object> This() const;
V8_INLINE Local<Object> Holder() const;
+ V8_INLINE Local<Value> NewTarget() const;
V8_INLINE bool IsConstructCall() const;
V8_INLINE Local<Value> Data() const;
V8_INLINE Isolate* GetIsolate() const;
V8_INLINE ReturnValue<T> GetReturnValue() const;
// This shouldn't be public, but the arm compiler needs it.
- static const int kArgsLength = 7;
+ static const int kArgsLength = 8;
protected:
friend class internal::FunctionCallbackArguments;
@@ -3209,6 +3210,7 @@ class FunctionCallbackInfo {
static const int kDataIndex = 4;
static const int kCalleeIndex = 5;
static const int kContextSaveIndex = 6;
+ static const int kNewTargetIndex = 7;
V8_INLINE FunctionCallbackInfo(internal::Object** implicit_args,
internal::Object** values,
@@ -7903,8 +7905,13 @@ Local<Object> FunctionCallbackInfo<T>::Holder() const {
&implicit_args_[kHolderIndex]));
}
+template <typename T>
+Local<Value> FunctionCallbackInfo<T>::NewTarget() const {
+ return Local<Value>(
+ reinterpret_cast<Value*>(&implicit_args_[kNewTargetIndex]));
+}
-template<typename T>
+template <typename T>
Local<Value> FunctionCallbackInfo<T>::Data() const {
return Local<Value>(reinterpret_cast<Value*>(&implicit_args_[kDataIndex]));
}
« no previous file with comments | « no previous file | src/api-arguments.h » ('j') | src/builtins.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698