Skip to content

Commit ed0748b

Browse files
committed
src: replace usage of deprecated Delete
PR-URL: #5159 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent d6eaa4a commit ed0748b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/node.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,8 @@ void SetupDomainUse(const FunctionCallbackInfo<Value>& args) {
10441044

10451045
// Do a little housekeeping.
10461046
env->process_object()->Delete(
1047-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupDomainUse"));
1047+
env->context(),
1048+
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupDomainUse")).FromJust();
10481049

10491050
uint32_t* const fields = env->domain_flag()->fields();
10501051
uint32_t const fields_count = env->domain_flag()->fields_count();
@@ -1067,7 +1068,8 @@ void SetupProcessObject(const FunctionCallbackInfo<Value>& args) {
10671068

10681069
env->set_push_values_to_array_function(args[0].As<Function>());
10691070
env->process_object()->Delete(
1070-
FIXED_ONE_BYTE_STRING(env->isolate(), "_setupProcessObject"));
1071+
env->context(),
1072+
FIXED_ONE_BYTE_STRING(env->isolate(), "_setupProcessObject")).FromJust();
10711073
}
10721074

10731075

@@ -1083,7 +1085,8 @@ void SetupNextTick(const FunctionCallbackInfo<Value>& args) {
10831085

10841086
// Do a little housekeeping.
10851087
env->process_object()->Delete(
1086-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupNextTick"));
1088+
env->context(),
1089+
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupNextTick")).FromJust();
10871090

10881091
// Values use to cross communicate with processNextTick.
10891092
uint32_t* const fields = env->tick_info()->fields();
@@ -1123,7 +1126,8 @@ void SetupPromises(const FunctionCallbackInfo<Value>& args) {
11231126
env->set_promise_reject_function(args[0].As<Function>());
11241127

11251128
env->process_object()->Delete(
1126-
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises"));
1129+
env->context(),
1130+
FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises")).FromJust();
11271131
}
11281132

11291133

src/stream_base.cc

Lines changed: 1 addition & 1 deletion
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)