From 85add2bf99b754004e26919518846662931ff3a1 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Mon, 24 Jul 2017 16:56:11 +0200 Subject: [PATCH] src: replace deprecated ForceSet() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ForceSet() is marked to be deprecated. Replacing it with DefineOwnProperty(). PR-URL: https://github.com/nodejs/node/pull/14450 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen --- src/async-wrap.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/async-wrap.cc b/src/async-wrap.cc index f215f877e8..038e1488ef 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