diff --git a/src/async-wrap.cc b/src/async-wrap.cc index f215f877e89a96..038e1488efe4fe 100644 --- a/src/async-wrap.cc +++ b/src/async-wrap.cc @@ -512,10 +512,10 @@ void AsyncWrap::Initialize(Local target, static_cast(v8::ReadOnly | v8::DontDelete); #define FORCE_SET_TARGET_FIELD(obj, str, field) \ - (obj)->ForceSet(context, \ - FIXED_ONE_BYTE_STRING(isolate, str), \ - field, \ - ReadOnlyDontDelete).FromJust() + (obj)->DefineOwnProperty(context, \ + FIXED_ONE_BYTE_STRING(isolate, str), \ + field, \ + ReadOnlyDontDelete).FromJust() // 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