diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 91d5b8c86c4..663be89629f 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -731,11 +731,6 @@ static void Query(const FunctionCallbackInfo& args) { Wrap* wrap = new Wrap(req_wrap_obj); wrap->SetOnComplete(callback); - // We must cache the wrap's js object here, because cares might make the - // callback from the wrap->Send stack. This will destroy the wrap's internal - // object reference, causing wrap->object() to return an empty handle. - Local object = Local::New(node_isolate, wrap->persistent()); - String::Utf8Value name(string); int err = wrap->Send(*name); if (err) delete wrap; @@ -762,11 +757,6 @@ static void QueryWithFamily(const FunctionCallbackInfo& args) { Wrap* wrap = new Wrap(req_wrap_obj); wrap->SetOnComplete(callback); - // We must cache the wrap's js object here, because cares might make the - // callback from the wrap->Send stack. This will destroy the wrap's internal - // object reference, causing wrap->object() to return an empty handle. - Local object = Local::New(node_isolate, wrap->persistent()); - String::Utf8Value name(string); int err = wrap->Send(*name, family); if (err) delete wrap;