Skip to content

Commit d824076

Browse files
committed
src: cares_wrap: remove two unused variables
1 parent c76ed64 commit d824076

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

src/cares_wrap.cc

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,6 @@ static void Query(const FunctionCallbackInfo<Value>& args) {
731731
Wrap* wrap = new Wrap(req_wrap_obj);
732732
wrap->SetOnComplete(callback);
733733

734-
// We must cache the wrap's js object here, because cares might make the
735-
// callback from the wrap->Send stack. This will destroy the wrap's internal
736-
// object reference, causing wrap->object() to return an empty handle.
737-
Local<Object> object = Local<Object>::New(node_isolate, wrap->persistent());
738-
739734
String::Utf8Value name(string);
740735
int err = wrap->Send(*name);
741736
if (err) delete wrap;
@@ -762,11 +757,6 @@ static void QueryWithFamily(const FunctionCallbackInfo<Value>& args) {
762757
Wrap* wrap = new Wrap(req_wrap_obj);
763758
wrap->SetOnComplete(callback);
764759

765-
// We must cache the wrap's js object here, because cares might make the
766-
// callback from the wrap->Send stack. This will destroy the wrap's internal
767-
// object reference, causing wrap->object() to return an empty handle.
768-
Local<Object> object = Local<Object>::New(node_isolate, wrap->persistent());
769-
770760
String::Utf8Value name(string);
771761
int err = wrap->Send(*name, family);
772762
if (err) delete wrap;

0 commit comments

Comments
 (0)