From d45045f318196de02bf5cc421c3057de2bf8e421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Mon, 8 Feb 2016 22:42:04 +0100 Subject: [PATCH] src: replace usage of deprecated Delete PR-URL: https://github.com/nodejs/node/pull/5159 Reviewed-By: Ben Noordhuis --- src/node.cc | 12 ++++++++---- src/stream_base.cc | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/node.cc b/src/node.cc index a736e22d0fa..0d4144f9ca3 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1051,7 +1051,8 @@ void SetupDomainUse(const FunctionCallbackInfo& args) { // Do a little housekeeping. env->process_object()->Delete( - FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupDomainUse")); + env->context(), + FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupDomainUse")).FromJust(); uint32_t* const fields = env->domain_flag()->fields(); uint32_t const fields_count = env->domain_flag()->fields_count(); @@ -1074,7 +1075,8 @@ void SetupProcessObject(const FunctionCallbackInfo& args) { env->set_push_values_to_array_function(args[0].As()); env->process_object()->Delete( - FIXED_ONE_BYTE_STRING(env->isolate(), "_setupProcessObject")); + env->context(), + FIXED_ONE_BYTE_STRING(env->isolate(), "_setupProcessObject")).FromJust(); } @@ -1090,7 +1092,8 @@ void SetupNextTick(const FunctionCallbackInfo& args) { // Do a little housekeeping. env->process_object()->Delete( - FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupNextTick")); + env->context(), + FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupNextTick")).FromJust(); // Values use to cross communicate with processNextTick. uint32_t* const fields = env->tick_info()->fields(); @@ -1130,7 +1133,8 @@ void SetupPromises(const FunctionCallbackInfo& args) { env->set_promise_reject_function(args[0].As()); env->process_object()->Delete( - FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises")); + env->context(), + FIXED_ONE_BYTE_STRING(args.GetIsolate(), "_setupPromises")).FromJust(); } diff --git a/src/stream_base.cc b/src/stream_base.cc index 27ae0fee7b1..42214bcdc25 100644 --- a/src/stream_base.cc +++ b/src/stream_base.cc @@ -371,7 +371,7 @@ void StreamBase::AfterWrite(WriteWrap* req_wrap, int status) { // Unref handle property Local req_wrap_obj = req_wrap->object(); - req_wrap_obj->Delete(env->handle_string()); + req_wrap_obj->Delete(env->context(), env->handle_string()).FromJust(); wrap->OnAfterWrite(req_wrap); Local argv[] = {