Browse Source

src: replace deprecated ForceSet() method

ForceSet() is marked to be deprecated. Replacing
it with DefineOwnProperty().

PR-URL: https://github.com/nodejs/node/pull/14450
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
v6
Franziska Hinkelmann 8 years ago
committed by Anna Henningsen
parent
commit
85add2bf99
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 8
      src/async-wrap.cc

8
src/async-wrap.cc

@ -512,10 +512,10 @@ void AsyncWrap::Initialize(Local<Object> target,
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete); static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
#define FORCE_SET_TARGET_FIELD(obj, str, field) \ #define FORCE_SET_TARGET_FIELD(obj, str, field) \
(obj)->ForceSet(context, \ (obj)->DefineOwnProperty(context, \
FIXED_ONE_BYTE_STRING(isolate, str), \ FIXED_ONE_BYTE_STRING(isolate, str), \
field, \ field, \
ReadOnlyDontDelete).FromJust() ReadOnlyDontDelete).FromJust()
// Attach the uint32_t[] where each slot contains the count of the number of // Attach the uint32_t[] where each slot contains the count of the number of
// callbacks waiting to be called on a particular event. It can then be // callbacks waiting to be called on a particular event. It can then be

Loading…
Cancel
Save