Commit 8c8083ca by Mohamed Akram

Fix references

parent bf4770a1
......@@ -415,7 +415,7 @@ void Backup::RetryErrorSetter(const Napi::CallbackInfo& info, const Napi::Value&
return;
}
Napi::Array array = value.As<Napi::Array>();
backup->retryErrors.Reset(array);
backup->retryErrors.Reset(array, 1);
}
void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) {
......@@ -429,4 +429,3 @@ void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) {
}
}
}
......@@ -104,7 +104,7 @@ public:
Baton(Backup* backup_, Napi::Function cb_) : backup(backup_) {
backup->Ref();
callback.Reset(cb_);
callback.Reset(cb_, 1);
}
virtual ~Baton() {
backup->Unref();
......
......@@ -625,7 +625,7 @@ Napi::Value Statement::Each(const Napi::CallbackInfo& info) {
return env.Null();
}
else {
baton->completed.Reset(completed);
baton->completed.Reset(completed, 1);
stmt->Schedule(Work_BeginEach, baton);
return info.This();
}
......
......@@ -85,7 +85,7 @@ public:
Baton(Statement* stmt_, Napi::Function cb_) : stmt(stmt_) {
stmt->Ref();
callback.Reset(cb_);
callback.Reset(cb_, 1);
}
virtual ~Baton() {
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