@contrast/agent 4.5.2 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/lib/assess/policy/propagators.json +20 -0
  2. package/lib/assess/policy/signatures.json +10 -0
  3. package/lib/core/config/options.js +3 -2
  4. package/lib/core/stacktrace.js +2 -1
  5. package/lib/hooks/frameworks/base.js +8 -2
  6. package/lib/hooks/frameworks/http.js +23 -16
  7. package/lib/hooks/frameworks/http2.js +73 -0
  8. package/lib/hooks/frameworks/index.js +8 -3
  9. package/lib/hooks/http.js +112 -128
  10. package/lib/hooks/require.js +16 -22
  11. package/lib/instrumentation.js +0 -3
  12. package/package.json +12 -15
  13. package/lib/hooks/frameworks/https.js +0 -42
  14. package/node_modules/bindings/LICENSE.md +0 -22
  15. package/node_modules/bindings/README.md +0 -98
  16. package/node_modules/bindings/bindings.js +0 -221
  17. package/node_modules/bindings/package.json +0 -32
  18. package/node_modules/file-uri-to-path/.npmignore +0 -1
  19. package/node_modules/file-uri-to-path/.travis.yml +0 -30
  20. package/node_modules/file-uri-to-path/History.md +0 -21
  21. package/node_modules/file-uri-to-path/LICENSE +0 -20
  22. package/node_modules/file-uri-to-path/README.md +0 -74
  23. package/node_modules/file-uri-to-path/index.d.ts +0 -2
  24. package/node_modules/file-uri-to-path/index.js +0 -66
  25. package/node_modules/file-uri-to-path/package.json +0 -36
  26. package/node_modules/file-uri-to-path/test/test.js +0 -24
  27. package/node_modules/file-uri-to-path/test/tests.json +0 -13
  28. package/node_modules/glossy/LICENSE +0 -19
  29. package/node_modules/glossy/README.md +0 -129
  30. package/node_modules/glossy/index.js +0 -12
  31. package/node_modules/glossy/lib/glossy/parse.js +0 -520
  32. package/node_modules/glossy/lib/glossy/produce.js +0 -459
  33. package/node_modules/glossy/package.json +0 -47
  34. package/node_modules/glossy/test/decide.js +0 -7
  35. package/node_modules/glossy/test/decode_pri.js +0 -24
  36. package/node_modules/glossy/test/parse_3164.js +0 -104
  37. package/node_modules/glossy/test/parse_5424.js +0 -106
  38. package/node_modules/glossy/test/parse_5848.js +0 -40
  39. package/node_modules/glossy/test/parse_8601.js +0 -14
  40. package/node_modules/glossy/test/parse_rfc3339.js +0 -9
  41. package/node_modules/glossy/test/produce.js +0 -162
  42. package/node_modules/glossy/test/runner.js +0 -40
  43. package/node_modules/glossy/test/structure_data.js +0 -24
  44. package/node_modules/nan/CHANGELOG.md +0 -537
  45. package/node_modules/nan/LICENSE.md +0 -13
  46. package/node_modules/nan/README.md +0 -455
  47. package/node_modules/nan/doc/asyncworker.md +0 -146
  48. package/node_modules/nan/doc/buffers.md +0 -54
  49. package/node_modules/nan/doc/callback.md +0 -76
  50. package/node_modules/nan/doc/converters.md +0 -41
  51. package/node_modules/nan/doc/errors.md +0 -226
  52. package/node_modules/nan/doc/json.md +0 -62
  53. package/node_modules/nan/doc/maybe_types.md +0 -583
  54. package/node_modules/nan/doc/methods.md +0 -664
  55. package/node_modules/nan/doc/new.md +0 -147
  56. package/node_modules/nan/doc/node_misc.md +0 -123
  57. package/node_modules/nan/doc/object_wrappers.md +0 -263
  58. package/node_modules/nan/doc/persistent.md +0 -296
  59. package/node_modules/nan/doc/scopes.md +0 -73
  60. package/node_modules/nan/doc/script.md +0 -38
  61. package/node_modules/nan/doc/string_bytes.md +0 -62
  62. package/node_modules/nan/doc/v8_internals.md +0 -199
  63. package/node_modules/nan/doc/v8_misc.md +0 -85
  64. package/node_modules/nan/include_dirs.js +0 -1
  65. package/node_modules/nan/nan.h +0 -2898
  66. package/node_modules/nan/nan_callbacks.h +0 -88
  67. package/node_modules/nan/nan_callbacks_12_inl.h +0 -514
  68. package/node_modules/nan/nan_callbacks_pre_12_inl.h +0 -520
  69. package/node_modules/nan/nan_converters.h +0 -72
  70. package/node_modules/nan/nan_converters_43_inl.h +0 -68
  71. package/node_modules/nan/nan_converters_pre_43_inl.h +0 -42
  72. package/node_modules/nan/nan_define_own_property_helper.h +0 -29
  73. package/node_modules/nan/nan_implementation_12_inl.h +0 -430
  74. package/node_modules/nan/nan_implementation_pre_12_inl.h +0 -263
  75. package/node_modules/nan/nan_json.h +0 -166
  76. package/node_modules/nan/nan_maybe_43_inl.h +0 -356
  77. package/node_modules/nan/nan_maybe_pre_43_inl.h +0 -268
  78. package/node_modules/nan/nan_new.h +0 -340
  79. package/node_modules/nan/nan_object_wrap.h +0 -156
  80. package/node_modules/nan/nan_persistent_12_inl.h +0 -132
  81. package/node_modules/nan/nan_persistent_pre_12_inl.h +0 -242
  82. package/node_modules/nan/nan_private.h +0 -73
  83. package/node_modules/nan/nan_string_bytes.h +0 -305
  84. package/node_modules/nan/nan_typedarray_contents.h +0 -96
  85. package/node_modules/nan/nan_weak.h +0 -437
  86. package/node_modules/nan/package.json +0 -41
  87. package/node_modules/nan/tools/1to2.js +0 -412
  88. package/node_modules/nan/tools/README.md +0 -14
  89. package/node_modules/nan/tools/package.json +0 -19
  90. package/node_modules/unix-dgram/LICENSE +0 -13
  91. package/node_modules/unix-dgram/README.md +0 -107
  92. package/node_modules/unix-dgram/binding.gyp +0 -20
  93. package/node_modules/unix-dgram/build/Makefile +0 -324
  94. package/node_modules/unix-dgram/build/Release/.deps/Release/obj.target/unix_dgram/src/unix_dgram.o.d +0 -58
  95. package/node_modules/unix-dgram/build/Release/.deps/Release/obj.target/unix_dgram.node.d +0 -1
  96. package/node_modules/unix-dgram/build/Release/.deps/Release/unix_dgram.node.d +0 -1
  97. package/node_modules/unix-dgram/build/Release/obj.target/unix_dgram/src/unix_dgram.o +0 -0
  98. package/node_modules/unix-dgram/build/Release/obj.target/unix_dgram.node +0 -0
  99. package/node_modules/unix-dgram/build/Release/unix_dgram.node +0 -0
  100. package/node_modules/unix-dgram/build/binding.Makefile +0 -6
  101. package/node_modules/unix-dgram/build/config.gypi +0 -213
  102. package/node_modules/unix-dgram/build/unix_dgram.target.mk +0 -159
  103. package/node_modules/unix-dgram/lib/unix_dgram.js +0 -168
  104. package/node_modules/unix-dgram/package.json +0 -36
  105. package/node_modules/unix-dgram/src/unix_dgram.cc +0 -404
  106. package/node_modules/unix-dgram/src/win_dummy.cc +0 -7
  107. package/node_modules/unix-dgram/test/test-connect-callback.js +0 -68
  108. package/node_modules/unix-dgram/test/test-connect.js +0 -53
  109. package/node_modules/unix-dgram/test/test-dgram-unix.js +0 -58
  110. package/node_modules/unix-dgram/test/test-send-error.js +0 -26
  111. package/node_modules/winston-syslog/.eslintrc +0 -7
  112. package/node_modules/winston-syslog/.travis.yml +0 -14
  113. package/node_modules/winston-syslog/CHANGELOG.md +0 -9
  114. package/node_modules/winston-syslog/LICENSE +0 -20
  115. package/node_modules/winston-syslog/README.md +0 -135
  116. package/node_modules/winston-syslog/lib/utils.js +0 -26
  117. package/node_modules/winston-syslog/lib/winston-syslog.js +0 -385
  118. package/node_modules/winston-syslog/package.json +0 -56
  119. package/node_modules/winston-syslog/test/format-test.js +0 -122
  120. package/node_modules/winston-syslog/test/syslog-test.js +0 -95
  121. package/node_modules/winston-syslog/test/unix-connect-test.js +0 -133
@@ -1,88 +0,0 @@
1
- /*********************************************************************
2
- * NAN - Native Abstractions for Node.js
3
- *
4
- * Copyright (c) 2018 NAN contributors
5
- *
6
- * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
7
- ********************************************************************/
8
-
9
- #ifndef NAN_CALLBACKS_H_
10
- #define NAN_CALLBACKS_H_
11
-
12
- template<typename T> class FunctionCallbackInfo;
13
- template<typename T> class PropertyCallbackInfo;
14
- template<typename T> class Global;
15
-
16
- typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
17
- typedef void(*GetterCallback)
18
- (v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
19
- typedef void(*SetterCallback)(
20
- v8::Local<v8::String>,
21
- v8::Local<v8::Value>,
22
- const PropertyCallbackInfo<void>&);
23
- typedef void(*PropertyGetterCallback)(
24
- v8::Local<v8::String>,
25
- const PropertyCallbackInfo<v8::Value>&);
26
- typedef void(*PropertySetterCallback)(
27
- v8::Local<v8::String>,
28
- v8::Local<v8::Value>,
29
- const PropertyCallbackInfo<v8::Value>&);
30
- typedef void(*PropertyEnumeratorCallback)
31
- (const PropertyCallbackInfo<v8::Array>&);
32
- typedef void(*PropertyDeleterCallback)(
33
- v8::Local<v8::String>,
34
- const PropertyCallbackInfo<v8::Boolean>&);
35
- typedef void(*PropertyQueryCallback)(
36
- v8::Local<v8::String>,
37
- const PropertyCallbackInfo<v8::Integer>&);
38
- typedef void(*IndexGetterCallback)(
39
- uint32_t,
40
- const PropertyCallbackInfo<v8::Value>&);
41
- typedef void(*IndexSetterCallback)(
42
- uint32_t,
43
- v8::Local<v8::Value>,
44
- const PropertyCallbackInfo<v8::Value>&);
45
- typedef void(*IndexEnumeratorCallback)
46
- (const PropertyCallbackInfo<v8::Array>&);
47
- typedef void(*IndexDeleterCallback)(
48
- uint32_t,
49
- const PropertyCallbackInfo<v8::Boolean>&);
50
- typedef void(*IndexQueryCallback)(
51
- uint32_t,
52
- const PropertyCallbackInfo<v8::Integer>&);
53
-
54
- namespace imp {
55
- typedef v8::Local<v8::AccessorSignature> Sig;
56
-
57
- static const int kDataIndex = 0;
58
-
59
- static const int kFunctionIndex = 1;
60
- static const int kFunctionFieldCount = 2;
61
-
62
- static const int kGetterIndex = 1;
63
- static const int kSetterIndex = 2;
64
- static const int kAccessorFieldCount = 3;
65
-
66
- static const int kPropertyGetterIndex = 1;
67
- static const int kPropertySetterIndex = 2;
68
- static const int kPropertyEnumeratorIndex = 3;
69
- static const int kPropertyDeleterIndex = 4;
70
- static const int kPropertyQueryIndex = 5;
71
- static const int kPropertyFieldCount = 6;
72
-
73
- static const int kIndexPropertyGetterIndex = 1;
74
- static const int kIndexPropertySetterIndex = 2;
75
- static const int kIndexPropertyEnumeratorIndex = 3;
76
- static const int kIndexPropertyDeleterIndex = 4;
77
- static const int kIndexPropertyQueryIndex = 5;
78
- static const int kIndexPropertyFieldCount = 6;
79
-
80
- } // end of namespace imp
81
-
82
- #if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
83
- # include "nan_callbacks_12_inl.h" // NOLINT(build/include)
84
- #else
85
- # include "nan_callbacks_pre_12_inl.h" // NOLINT(build/include)
86
- #endif
87
-
88
- #endif // NAN_CALLBACKS_H_
@@ -1,514 +0,0 @@
1
- /*********************************************************************
2
- * NAN - Native Abstractions for Node.js
3
- *
4
- * Copyright (c) 2018 NAN contributors
5
- *
6
- * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
7
- ********************************************************************/
8
-
9
- #ifndef NAN_CALLBACKS_12_INL_H_
10
- #define NAN_CALLBACKS_12_INL_H_
11
-
12
- template<typename T>
13
- class ReturnValue {
14
- v8::ReturnValue<T> value_;
15
-
16
- public:
17
- template <class S>
18
- explicit inline ReturnValue(const v8::ReturnValue<S> &value) :
19
- value_(value) {}
20
- template <class S>
21
- explicit inline ReturnValue(const ReturnValue<S>& that)
22
- : value_(that.value_) {
23
- TYPE_CHECK(T, S);
24
- }
25
-
26
- // Handle setters
27
- template <typename S> inline void Set(const v8::Local<S> &handle) {
28
- TYPE_CHECK(T, S);
29
- value_.Set(handle);
30
- }
31
-
32
- template <typename S> inline void Set(const Global<S> &handle) {
33
- TYPE_CHECK(T, S);
34
- #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 4 || \
35
- (V8_MAJOR_VERSION == 4 && defined(V8_MINOR_VERSION) && \
36
- (V8_MINOR_VERSION > 5 || (V8_MINOR_VERSION == 5 && \
37
- defined(V8_BUILD_NUMBER) && V8_BUILD_NUMBER >= 8))))
38
- value_.Set(handle);
39
- #else
40
- value_.Set(*reinterpret_cast<const v8::Persistent<S>*>(&handle));
41
- const_cast<Global<S> &>(handle).Reset();
42
- #endif
43
- }
44
-
45
- // Fast primitive setters
46
- inline void Set(bool value) {
47
- TYPE_CHECK(T, v8::Boolean);
48
- value_.Set(value);
49
- }
50
-
51
- inline void Set(double i) {
52
- TYPE_CHECK(T, v8::Number);
53
- value_.Set(i);
54
- }
55
-
56
- inline void Set(int32_t i) {
57
- TYPE_CHECK(T, v8::Integer);
58
- value_.Set(i);
59
- }
60
-
61
- inline void Set(uint32_t i) {
62
- TYPE_CHECK(T, v8::Integer);
63
- value_.Set(i);
64
- }
65
-
66
- // Fast JS primitive setters
67
- inline void SetNull() {
68
- TYPE_CHECK(T, v8::Primitive);
69
- value_.SetNull();
70
- }
71
-
72
- inline void SetUndefined() {
73
- TYPE_CHECK(T, v8::Primitive);
74
- value_.SetUndefined();
75
- }
76
-
77
- inline void SetEmptyString() {
78
- TYPE_CHECK(T, v8::String);
79
- value_.SetEmptyString();
80
- }
81
-
82
- // Convenience getter for isolate
83
- inline v8::Isolate *GetIsolate() const {
84
- return value_.GetIsolate();
85
- }
86
-
87
- // Pointer setter: Uncompilable to prevent inadvertent misuse.
88
- template<typename S>
89
- inline void Set(S *whatever) { TYPE_CHECK(S*, v8::Primitive); }
90
- };
91
-
92
- template<typename T>
93
- class FunctionCallbackInfo {
94
- const v8::FunctionCallbackInfo<T> &info_;
95
- const v8::Local<v8::Value> data_;
96
-
97
- public:
98
- explicit inline FunctionCallbackInfo(
99
- const v8::FunctionCallbackInfo<T> &info
100
- , v8::Local<v8::Value> data) :
101
- info_(info)
102
- , data_(data) {}
103
-
104
- inline ReturnValue<T> GetReturnValue() const {
105
- return ReturnValue<T>(info_.GetReturnValue());
106
- }
107
-
108
- #if NODE_MAJOR_VERSION < 10
109
- inline v8::Local<v8::Function> Callee() const { return info_.Callee(); }
110
- #endif
111
- inline v8::Local<v8::Value> Data() const { return data_; }
112
- inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
113
- inline bool IsConstructCall() const { return info_.IsConstructCall(); }
114
- inline int Length() const { return info_.Length(); }
115
- inline v8::Local<v8::Value> operator[](int i) const { return info_[i]; }
116
- inline v8::Local<v8::Object> This() const { return info_.This(); }
117
- inline v8::Isolate *GetIsolate() const { return info_.GetIsolate(); }
118
-
119
-
120
- protected:
121
- static const int kHolderIndex = 0;
122
- static const int kIsolateIndex = 1;
123
- static const int kReturnValueDefaultValueIndex = 2;
124
- static const int kReturnValueIndex = 3;
125
- static const int kDataIndex = 4;
126
- static const int kCalleeIndex = 5;
127
- static const int kContextSaveIndex = 6;
128
- static const int kArgsLength = 7;
129
-
130
- private:
131
- NAN_DISALLOW_ASSIGN_COPY_MOVE(FunctionCallbackInfo)
132
- };
133
-
134
- template<typename T>
135
- class PropertyCallbackInfo {
136
- const v8::PropertyCallbackInfo<T> &info_;
137
- const v8::Local<v8::Value> data_;
138
-
139
- public:
140
- explicit inline PropertyCallbackInfo(
141
- const v8::PropertyCallbackInfo<T> &info
142
- , const v8::Local<v8::Value> data) :
143
- info_(info)
144
- , data_(data) {}
145
-
146
- inline v8::Isolate* GetIsolate() const { return info_.GetIsolate(); }
147
- inline v8::Local<v8::Value> Data() const { return data_; }
148
- inline v8::Local<v8::Object> This() const { return info_.This(); }
149
- inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
150
- inline ReturnValue<T> GetReturnValue() const {
151
- return ReturnValue<T>(info_.GetReturnValue());
152
- }
153
-
154
- protected:
155
- static const int kHolderIndex = 0;
156
- static const int kIsolateIndex = 1;
157
- static const int kReturnValueDefaultValueIndex = 2;
158
- static const int kReturnValueIndex = 3;
159
- static const int kDataIndex = 4;
160
- static const int kThisIndex = 5;
161
- static const int kArgsLength = 6;
162
-
163
- private:
164
- NAN_DISALLOW_ASSIGN_COPY_MOVE(PropertyCallbackInfo)
165
- };
166
-
167
- namespace imp {
168
- static
169
- void FunctionCallbackWrapper(const v8::FunctionCallbackInfo<v8::Value> &info) {
170
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
171
- FunctionCallback callback = reinterpret_cast<FunctionCallback>(
172
- reinterpret_cast<intptr_t>(
173
- obj->GetInternalField(kFunctionIndex).As<v8::External>()->Value()));
174
- FunctionCallbackInfo<v8::Value>
175
- cbinfo(info, obj->GetInternalField(kDataIndex));
176
- callback(cbinfo);
177
- }
178
-
179
- typedef void (*NativeFunction)(const v8::FunctionCallbackInfo<v8::Value> &);
180
-
181
- #if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
182
- static
183
- void GetterCallbackWrapper(
184
- v8::Local<v8::Name> property
185
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
186
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
187
- PropertyCallbackInfo<v8::Value>
188
- cbinfo(info, obj->GetInternalField(kDataIndex));
189
- GetterCallback callback = reinterpret_cast<GetterCallback>(
190
- reinterpret_cast<intptr_t>(
191
- obj->GetInternalField(kGetterIndex).As<v8::External>()->Value()));
192
- callback(property.As<v8::String>(), cbinfo);
193
- }
194
-
195
- typedef void (*NativeGetter)
196
- (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
197
-
198
- static
199
- void SetterCallbackWrapper(
200
- v8::Local<v8::Name> property
201
- , v8::Local<v8::Value> value
202
- , const v8::PropertyCallbackInfo<void> &info) {
203
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
204
- PropertyCallbackInfo<void>
205
- cbinfo(info, obj->GetInternalField(kDataIndex));
206
- SetterCallback callback = reinterpret_cast<SetterCallback>(
207
- reinterpret_cast<intptr_t>(
208
- obj->GetInternalField(kSetterIndex).As<v8::External>()->Value()));
209
- callback(property.As<v8::String>(), value, cbinfo);
210
- }
211
-
212
- typedef void (*NativeSetter)(
213
- v8::Local<v8::Name>
214
- , v8::Local<v8::Value>
215
- , const v8::PropertyCallbackInfo<void> &);
216
- #else
217
- static
218
- void GetterCallbackWrapper(
219
- v8::Local<v8::String> property
220
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
221
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
222
- PropertyCallbackInfo<v8::Value>
223
- cbinfo(info, obj->GetInternalField(kDataIndex));
224
- GetterCallback callback = reinterpret_cast<GetterCallback>(
225
- reinterpret_cast<intptr_t>(
226
- obj->GetInternalField(kGetterIndex).As<v8::External>()->Value()));
227
- callback(property, cbinfo);
228
- }
229
-
230
- typedef void (*NativeGetter)
231
- (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &);
232
-
233
- static
234
- void SetterCallbackWrapper(
235
- v8::Local<v8::String> property
236
- , v8::Local<v8::Value> value
237
- , const v8::PropertyCallbackInfo<void> &info) {
238
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
239
- PropertyCallbackInfo<void>
240
- cbinfo(info, obj->GetInternalField(kDataIndex));
241
- SetterCallback callback = reinterpret_cast<SetterCallback>(
242
- reinterpret_cast<intptr_t>(
243
- obj->GetInternalField(kSetterIndex).As<v8::External>()->Value()));
244
- callback(property, value, cbinfo);
245
- }
246
-
247
- typedef void (*NativeSetter)(
248
- v8::Local<v8::String>
249
- , v8::Local<v8::Value>
250
- , const v8::PropertyCallbackInfo<void> &);
251
- #endif
252
-
253
- #if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
254
- static
255
- void PropertyGetterCallbackWrapper(
256
- v8::Local<v8::Name> property
257
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
258
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
259
- PropertyCallbackInfo<v8::Value>
260
- cbinfo(info, obj->GetInternalField(kDataIndex));
261
- PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
262
- reinterpret_cast<intptr_t>(
263
- obj->GetInternalField(kPropertyGetterIndex)
264
- .As<v8::External>()->Value()));
265
- callback(property.As<v8::String>(), cbinfo);
266
- }
267
-
268
- typedef void (*NativePropertyGetter)
269
- (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &);
270
-
271
- static
272
- void PropertySetterCallbackWrapper(
273
- v8::Local<v8::Name> property
274
- , v8::Local<v8::Value> value
275
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
276
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
277
- PropertyCallbackInfo<v8::Value>
278
- cbinfo(info, obj->GetInternalField(kDataIndex));
279
- PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
280
- reinterpret_cast<intptr_t>(
281
- obj->GetInternalField(kPropertySetterIndex)
282
- .As<v8::External>()->Value()));
283
- callback(property.As<v8::String>(), value, cbinfo);
284
- }
285
-
286
- typedef void (*NativePropertySetter)(
287
- v8::Local<v8::Name>
288
- , v8::Local<v8::Value>
289
- , const v8::PropertyCallbackInfo<v8::Value> &);
290
-
291
- static
292
- void PropertyEnumeratorCallbackWrapper(
293
- const v8::PropertyCallbackInfo<v8::Array> &info) {
294
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
295
- PropertyCallbackInfo<v8::Array>
296
- cbinfo(info, obj->GetInternalField(kDataIndex));
297
- PropertyEnumeratorCallback callback =
298
- reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
299
- obj->GetInternalField(kPropertyEnumeratorIndex)
300
- .As<v8::External>()->Value()));
301
- callback(cbinfo);
302
- }
303
-
304
- typedef void (*NativePropertyEnumerator)
305
- (const v8::PropertyCallbackInfo<v8::Array> &);
306
-
307
- static
308
- void PropertyDeleterCallbackWrapper(
309
- v8::Local<v8::Name> property
310
- , const v8::PropertyCallbackInfo<v8::Boolean> &info) {
311
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
312
- PropertyCallbackInfo<v8::Boolean>
313
- cbinfo(info, obj->GetInternalField(kDataIndex));
314
- PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
315
- reinterpret_cast<intptr_t>(
316
- obj->GetInternalField(kPropertyDeleterIndex)
317
- .As<v8::External>()->Value()));
318
- callback(property.As<v8::String>(), cbinfo);
319
- }
320
-
321
- typedef void (NativePropertyDeleter)
322
- (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Boolean> &);
323
-
324
- static
325
- void PropertyQueryCallbackWrapper(
326
- v8::Local<v8::Name> property
327
- , const v8::PropertyCallbackInfo<v8::Integer> &info) {
328
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
329
- PropertyCallbackInfo<v8::Integer>
330
- cbinfo(info, obj->GetInternalField(kDataIndex));
331
- PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
332
- reinterpret_cast<intptr_t>(
333
- obj->GetInternalField(kPropertyQueryIndex)
334
- .As<v8::External>()->Value()));
335
- callback(property.As<v8::String>(), cbinfo);
336
- }
337
-
338
- typedef void (*NativePropertyQuery)
339
- (v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Integer> &);
340
- #else
341
- static
342
- void PropertyGetterCallbackWrapper(
343
- v8::Local<v8::String> property
344
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
345
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
346
- PropertyCallbackInfo<v8::Value>
347
- cbinfo(info, obj->GetInternalField(kDataIndex));
348
- PropertyGetterCallback callback = reinterpret_cast<PropertyGetterCallback>(
349
- reinterpret_cast<intptr_t>(
350
- obj->GetInternalField(kPropertyGetterIndex)
351
- .As<v8::External>()->Value()));
352
- callback(property, cbinfo);
353
- }
354
-
355
- typedef void (*NativePropertyGetter)
356
- (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &);
357
-
358
- static
359
- void PropertySetterCallbackWrapper(
360
- v8::Local<v8::String> property
361
- , v8::Local<v8::Value> value
362
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
363
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
364
- PropertyCallbackInfo<v8::Value>
365
- cbinfo(info, obj->GetInternalField(kDataIndex));
366
- PropertySetterCallback callback = reinterpret_cast<PropertySetterCallback>(
367
- reinterpret_cast<intptr_t>(
368
- obj->GetInternalField(kPropertySetterIndex)
369
- .As<v8::External>()->Value()));
370
- callback(property, value, cbinfo);
371
- }
372
-
373
- typedef void (*NativePropertySetter)(
374
- v8::Local<v8::String>
375
- , v8::Local<v8::Value>
376
- , const v8::PropertyCallbackInfo<v8::Value> &);
377
-
378
- static
379
- void PropertyEnumeratorCallbackWrapper(
380
- const v8::PropertyCallbackInfo<v8::Array> &info) {
381
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
382
- PropertyCallbackInfo<v8::Array>
383
- cbinfo(info, obj->GetInternalField(kDataIndex));
384
- PropertyEnumeratorCallback callback =
385
- reinterpret_cast<PropertyEnumeratorCallback>(reinterpret_cast<intptr_t>(
386
- obj->GetInternalField(kPropertyEnumeratorIndex)
387
- .As<v8::External>()->Value()));
388
- callback(cbinfo);
389
- }
390
-
391
- typedef void (*NativePropertyEnumerator)
392
- (const v8::PropertyCallbackInfo<v8::Array> &);
393
-
394
- static
395
- void PropertyDeleterCallbackWrapper(
396
- v8::Local<v8::String> property
397
- , const v8::PropertyCallbackInfo<v8::Boolean> &info) {
398
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
399
- PropertyCallbackInfo<v8::Boolean>
400
- cbinfo(info, obj->GetInternalField(kDataIndex));
401
- PropertyDeleterCallback callback = reinterpret_cast<PropertyDeleterCallback>(
402
- reinterpret_cast<intptr_t>(
403
- obj->GetInternalField(kPropertyDeleterIndex)
404
- .As<v8::External>()->Value()));
405
- callback(property, cbinfo);
406
- }
407
-
408
- typedef void (NativePropertyDeleter)
409
- (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Boolean> &);
410
-
411
- static
412
- void PropertyQueryCallbackWrapper(
413
- v8::Local<v8::String> property
414
- , const v8::PropertyCallbackInfo<v8::Integer> &info) {
415
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
416
- PropertyCallbackInfo<v8::Integer>
417
- cbinfo(info, obj->GetInternalField(kDataIndex));
418
- PropertyQueryCallback callback = reinterpret_cast<PropertyQueryCallback>(
419
- reinterpret_cast<intptr_t>(
420
- obj->GetInternalField(kPropertyQueryIndex)
421
- .As<v8::External>()->Value()));
422
- callback(property, cbinfo);
423
- }
424
-
425
- typedef void (*NativePropertyQuery)
426
- (v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Integer> &);
427
- #endif
428
-
429
- static
430
- void IndexGetterCallbackWrapper(
431
- uint32_t index, const v8::PropertyCallbackInfo<v8::Value> &info) {
432
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
433
- PropertyCallbackInfo<v8::Value>
434
- cbinfo(info, obj->GetInternalField(kDataIndex));
435
- IndexGetterCallback callback = reinterpret_cast<IndexGetterCallback>(
436
- reinterpret_cast<intptr_t>(
437
- obj->GetInternalField(kIndexPropertyGetterIndex)
438
- .As<v8::External>()->Value()));
439
- callback(index, cbinfo);
440
- }
441
-
442
- typedef void (*NativeIndexGetter)
443
- (uint32_t, const v8::PropertyCallbackInfo<v8::Value> &);
444
-
445
- static
446
- void IndexSetterCallbackWrapper(
447
- uint32_t index
448
- , v8::Local<v8::Value> value
449
- , const v8::PropertyCallbackInfo<v8::Value> &info) {
450
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
451
- PropertyCallbackInfo<v8::Value>
452
- cbinfo(info, obj->GetInternalField(kDataIndex));
453
- IndexSetterCallback callback = reinterpret_cast<IndexSetterCallback>(
454
- reinterpret_cast<intptr_t>(
455
- obj->GetInternalField(kIndexPropertySetterIndex)
456
- .As<v8::External>()->Value()));
457
- callback(index, value, cbinfo);
458
- }
459
-
460
- typedef void (*NativeIndexSetter)(
461
- uint32_t
462
- , v8::Local<v8::Value>
463
- , const v8::PropertyCallbackInfo<v8::Value> &);
464
-
465
- static
466
- void IndexEnumeratorCallbackWrapper(
467
- const v8::PropertyCallbackInfo<v8::Array> &info) {
468
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
469
- PropertyCallbackInfo<v8::Array>
470
- cbinfo(info, obj->GetInternalField(kDataIndex));
471
- IndexEnumeratorCallback callback = reinterpret_cast<IndexEnumeratorCallback>(
472
- reinterpret_cast<intptr_t>(
473
- obj->GetInternalField(
474
- kIndexPropertyEnumeratorIndex).As<v8::External>()->Value()));
475
- callback(cbinfo);
476
- }
477
-
478
- typedef void (*NativeIndexEnumerator)
479
- (const v8::PropertyCallbackInfo<v8::Array> &);
480
-
481
- static
482
- void IndexDeleterCallbackWrapper(
483
- uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean> &info) {
484
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
485
- PropertyCallbackInfo<v8::Boolean>
486
- cbinfo(info, obj->GetInternalField(kDataIndex));
487
- IndexDeleterCallback callback = reinterpret_cast<IndexDeleterCallback>(
488
- reinterpret_cast<intptr_t>(
489
- obj->GetInternalField(kIndexPropertyDeleterIndex)
490
- .As<v8::External>()->Value()));
491
- callback(index, cbinfo);
492
- }
493
-
494
- typedef void (*NativeIndexDeleter)
495
- (uint32_t, const v8::PropertyCallbackInfo<v8::Boolean> &);
496
-
497
- static
498
- void IndexQueryCallbackWrapper(
499
- uint32_t index, const v8::PropertyCallbackInfo<v8::Integer> &info) {
500
- v8::Local<v8::Object> obj = info.Data().As<v8::Object>();
501
- PropertyCallbackInfo<v8::Integer>
502
- cbinfo(info, obj->GetInternalField(kDataIndex));
503
- IndexQueryCallback callback = reinterpret_cast<IndexQueryCallback>(
504
- reinterpret_cast<intptr_t>(
505
- obj->GetInternalField(kIndexPropertyQueryIndex)
506
- .As<v8::External>()->Value()));
507
- callback(index, cbinfo);
508
- }
509
-
510
- typedef void (*NativeIndexQuery)
511
- (uint32_t, const v8::PropertyCallbackInfo<v8::Integer> &);
512
- } // end of namespace imp
513
-
514
- #endif // NAN_CALLBACKS_12_INL_H_