Commit 8c8083ca by Mohamed Akram

Fix references

parent bf4770a1
...@@ -415,7 +415,7 @@ void Backup::RetryErrorSetter(const Napi::CallbackInfo& info, const Napi::Value& ...@@ -415,7 +415,7 @@ void Backup::RetryErrorSetter(const Napi::CallbackInfo& info, const Napi::Value&
return; return;
} }
Napi::Array array = value.As<Napi::Array>(); Napi::Array array = value.As<Napi::Array>();
backup->retryErrors.Reset(array); backup->retryErrors.Reset(array, 1);
} }
void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) { void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) {
...@@ -429,4 +429,3 @@ void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) { ...@@ -429,4 +429,3 @@ void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) {
} }
} }
} }
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
Baton(Backup* backup_, Napi::Function cb_) : backup(backup_) { Baton(Backup* backup_, Napi::Function cb_) : backup(backup_) {
backup->Ref(); backup->Ref();
callback.Reset(cb_); callback.Reset(cb_, 1);
} }
virtual ~Baton() { virtual ~Baton() {
backup->Unref(); backup->Unref();
......
...@@ -625,7 +625,7 @@ Napi::Value Statement::Each(const Napi::CallbackInfo& info) { ...@@ -625,7 +625,7 @@ Napi::Value Statement::Each(const Napi::CallbackInfo& info) {
return env.Null(); return env.Null();
} }
else { else {
baton->completed.Reset(completed); baton->completed.Reset(completed, 1);
stmt->Schedule(Work_BeginEach, baton); stmt->Schedule(Work_BeginEach, baton);
return info.This(); return info.This();
} }
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
Baton(Statement* stmt_, Napi::Function cb_) : stmt(stmt_) { Baton(Statement* stmt_, Napi::Function cb_) : stmt(stmt_) {
stmt->Ref(); stmt->Ref();
callback.Reset(cb_); callback.Reset(cb_, 1);
} }
virtual ~Baton() { virtual ~Baton() {
for (unsigned int i = 0; i < parameters.size(); i++) { for (unsigned int i = 0; i < parameters.size(); i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment