Skip to content

Commit d45045f

Browse files
targosAli Sheikh
authored and
Ali Sheikh
committed
src: replace usage of deprecated Delete
PR-URL: #5159 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 16b0a8c commit d45045f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/node.cc

+8-4
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,8 @@ void SetupDomainUse(const FunctionCallbackInfo<Value>& args) {
10511051

10521052
// Do a little housekeeping.
10531053
env->process_object()->Delete(
1054-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupDomainUse"));
1054+
env->context(),
1055+
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupDomainUse")).FromJust();
10551056

10561057
uint32_t* const fields = env->domain_flag()->fields();
10571058
uint32_t const fields_count = env->domain_flag()->fields_count();
@@ -1074,7 +1075,8 @@ void SetupProcessObject(const FunctionCallbackInfo<Value>& args) {
10741075

10751076
env->set_push_values_to_array_function(args[0].As<Function>());
10761077
env->process_object()->Delete(
1077-
FIXED_ONE_BYTE_STRING(env->isolate(), "_setupProcessObject"));
1078+
env->context(),
1079+
FIXED_ONE_BYTE_STRING(env->isolate(), "_setupProcessObject")).FromJust();
10781080
}
10791081

10801082

@@ -1090,7 +1092,8 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
10901092

10911093
// Do a little housekeeping.
10921094
env->process_object()->Delete(
1093-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupNextTick"));
1095+
env->context(),
1096+
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupNextTick")).FromJust();
10941097

10951098
// Values use to cross communicate with processNextTick.
10961099
uint32_t* const fields = env->tick_info()->fields();
@@ -1130,7 +1133,8 @@ void SetupPromises(const FunctionCallbackInfo<Value>& args) {
11301133
env->set_promise_reject_function(args[0].As<Function>());
11311134

11321135
env->process_object()->Delete(
1133-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises"));
1136+
env->context(),
1137+
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises")).FromJust();
11341138
}
11351139

11361140

src/stream_base.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ void StreamBase::AfterWrite(WriteWrap* req_wrap, int status) {
371371

372372
// Unref handle property
373373
Local<Object> req_wrap_obj = req_wrap->object();
374-
req_wrap_obj->Delete(env->handle_string());
374+
req_wrap_obj->Delete(env->context(), env->handle_string()).FromJust();
375375
wrap->OnAfterWrite(req_wrap);
376376

377377
Local<Value> argv[] = {

0 commit comments

Comments
 (0)