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. 2
      src/async-wrap.cc

2
src/async-wrap.cc

@ -512,7 +512,7 @@ void AsyncWrap::Initialize(Local<Object> target,
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
#define FORCE_SET_TARGET_FIELD(obj, str, field) \
(obj)->ForceSet(context, \
(obj)->DefineOwnProperty(context, \
FIXED_ONE_BYTE_STRING(isolate, str), \
field, \
ReadOnlyDontDelete).FromJust()

Loading…
Cancel
Save