summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cares_wrap.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
index 91d5b8c86c..663be89629 100644
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -731,11 +731,6 @@ static void Query(const FunctionCallbackInfo<Value>& 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> object = Local<Object>::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<Value>& 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> object = Local<Object>::New(node_isolate, wrap->persistent());
-
String::Utf8Value name(string);
int err = wrap->Send(*name, family);
if (err) delete wrap;