Skip to content

Commit ca1263d

Browse files
committed
src: replace deprecated ForceSet() method
ForceSet() is marked to be deprecated. Replacing it with DefineOwnProperty().
1 parent 45b730e commit ca1263d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/async-wrap.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,10 @@ void AsyncWrap::Initialize(Local<Object> target,
512512
static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
513513

514514
#define FORCE_SET_TARGET_FIELD(obj, str, field) \
515-
(obj)->ForceSet(context, \
516-
FIXED_ONE_BYTE_STRING(isolate, str), \
517-
field, \
518-
ReadOnlyDontDelete).FromJust()
515+
(obj)->DefineOwnProperty(context, \
516+
FIXED_ONE_BYTE_STRING(isolate, str), \
517+
field, \
518+
ReadOnlyDontDelete).FromJust()
519519

520520
// Attach the uint32_t[] where each slot contains the count of the number of
521521
// callbacks waiting to be called on a particular event. It can then be

0 commit comments

Comments
 (0)