Skip to content

Commit 9167b9c

Browse files
committed
fix v::PropertyCallbackInfo::This() deprecation
1 parent 5136a90 commit 9167b9c

23 files changed

Lines changed: 80 additions & 81 deletions

generate/templates/manual/filter_source/repo.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ NAN_METHOD(GitFilterSource::Repo) {
1616

1717
baton->error_code = GIT_OK;
1818
baton->error = NULL;
19-
baton->src = Nan::ObjectWrap::Unwrap<GitFilterSource>(info.This())->GetValue();
19+
baton->src = Nan::ObjectWrap::Unwrap<GitFilterSource>(info.Holder())->GetValue();
2020

2121
Nan::Callback *callback = new Nan::Callback(v8::Local<Function>::Cast(info[info.Length() - 1]));
2222
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
2323
RepoWorker *worker = new RepoWorker(baton, callback, cleanupHandles);
2424

25-
worker->Reference<GitFilterSource>("src", info.This());
25+
worker->Reference<GitFilterSource>("src", info.Holder());
2626

2727
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
2828
nodegitContext->QueueWorker(worker);

generate/templates/manual/remote/ls.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ NAN_METHOD(GitRemote::ReferenceList)
99
baton->error_code = GIT_OK;
1010
baton->error = NULL;
1111
baton->out = new std::vector<git_remote_head*>;
12-
baton->remote = Nan::ObjectWrap::Unwrap<GitRemote>(info.This())->GetValue();
12+
baton->remote = Nan::ObjectWrap::Unwrap<GitRemote>(info.Holder())->GetValue();
1313

1414
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
1515
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
1616
ReferenceListWorker *worker = new ReferenceListWorker(baton, callback, cleanupHandles);
17-
worker->Reference<GitRemote>("remote", info.This());
17+
worker->Reference<GitRemote>("remote", info.Holder());
1818
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
1919
nodegitContext->QueueWorker(worker);
2020
return;

generate/templates/manual/repository/get_references.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ NAN_METHOD(GitRepository::GetReferences)
99
baton->error_code = GIT_OK;
1010
baton->error = NULL;
1111
baton->out = new std::vector<git_reference *>;
12-
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.This())->GetValue();
12+
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.Holder())->GetValue();
1313

1414
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
1515
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
1616
GetReferencesWorker *worker = new GetReferencesWorker(baton, callback, cleanupHandles);
17-
worker->Reference<GitRepository>("repo", info.This());
17+
worker->Reference<GitRepository>("repo", info.Holder());
1818
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
1919
nodegitContext->QueueWorker(worker);
2020
return;

generate/templates/manual/repository/get_remotes.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ NAN_METHOD(GitRepository::GetRemotes)
99
baton->error_code = GIT_OK;
1010
baton->error = NULL;
1111
baton->out = new std::vector<git_remote *>;
12-
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.This())->GetValue();
12+
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.Holder())->GetValue();
1313

1414
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
1515
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
1616
GetRemotesWorker *worker = new GetRemotesWorker(baton, callback, cleanupHandles);
17-
worker->Reference<GitRepository>("repo", info.This());
17+
worker->Reference<GitRepository>("repo", info.Holder());
1818
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
1919
nodegitContext->QueueWorker(worker);
2020
return;

generate/templates/manual/repository/get_submodules.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ NAN_METHOD(GitRepository::GetSubmodules)
99
baton->error_code = GIT_OK;
1010
baton->error = NULL;
1111
baton->out = new std::vector<git_submodule *>;
12-
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.This())->GetValue();
12+
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.Holder())->GetValue();
1313

1414
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
1515
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
1616
GetSubmodulesWorker *worker = new GetSubmodulesWorker(baton, callback, cleanupHandles);
17-
worker->Reference<GitRepository>("repo", info.This());
17+
worker->Reference<GitRepository>("repo", info.Holder());
1818
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
1919
nodegitContext->QueueWorker(worker);
2020
return;

generate/templates/manual/repository/refresh_references.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,12 +416,12 @@ NAN_METHOD(GitRepository::RefreshReferences)
416416
baton->error_code = GIT_OK;
417417
baton->error = NULL;
418418
baton->out = (void *)new RefreshReferencesData();
419-
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.This())->GetValue();
419+
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.Holder())->GetValue();
420420

421421
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
422422
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
423423
RefreshReferencesWorker *worker = new RefreshReferencesWorker(baton, callback, cleanupHandles);
424-
worker->Reference<GitRepository>("repo", info.This());
424+
worker->Reference<GitRepository>("repo", info.Holder());
425425
worker->Reference("signatureType", signatureType);
426426
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
427427
nodegitContext->QueueWorker(worker);

generate/templates/manual/repository/statistics.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,13 +1781,13 @@ NAN_METHOD(GitRepository::Statistics)
17811781

17821782
baton->error_code = GIT_OK;
17831783
baton->error = NULL;
1784-
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.This())->GetValue();
1784+
baton->repo = Nan::ObjectWrap::Unwrap<GitRepository>(info.Holder())->GetValue();
17851785
baton->out = static_cast<void *>(new RepoAnalysis(baton->repo));
17861786

17871787
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
17881788
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
17891789
StatisticsWorker *worker = new StatisticsWorker(baton, callback, cleanupHandles);
1790-
worker->Reference<GitRepository>("repo", info.This());
1790+
worker->Reference<GitRepository>("repo", info.Holder());
17911791
nodegit::Context *nodegitContext =
17921792
reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
17931793
nodegitContext->QueueWorker(worker);

generate/templates/manual/revwalk/commit_walk.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ NAN_METHOD(GitRevwalk::CommitWalk) {
139139
} else {
140140
baton->returnPlainObjects = false;
141141
}
142-
baton->walk = Nan::ObjectWrap::Unwrap<GitRevwalk>(info.This())->GetValue();
142+
baton->walk = Nan::ObjectWrap::Unwrap<GitRevwalk>(info.Holder())->GetValue();
143143
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
144144
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
145145
CommitWalkWorker *worker = new CommitWalkWorker(baton, callback, cleanupHandles);
146-
worker->Reference<GitRevwalk>("commitWalk", info.This());
146+
worker->Reference<GitRevwalk>("commitWalk", info.Holder());
147147

148148
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
149149
nodegitContext->QueueWorker(worker);

generate/templates/manual/revwalk/fast_walk.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ NAN_METHOD(GitRevwalk::FastWalk)
1515
baton->max_count = Nan::To<unsigned int>(info[0]).FromJust();
1616
baton->out = new std::vector<git_oid*>;
1717
baton->out->reserve(baton->max_count);
18-
baton->walk = Nan::ObjectWrap::Unwrap<GitRevwalk>(info.This())->GetValue();
18+
baton->walk = Nan::ObjectWrap::Unwrap<GitRevwalk>(info.Holder())->GetValue();
1919

2020
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
2121
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
2222
FastWalkWorker *worker = new FastWalkWorker(baton, callback, cleanupHandles);
23-
worker->Reference<GitRevwalk>("fastWalk", info.This());
23+
worker->Reference<GitRevwalk>("fastWalk", info.Holder());
2424

2525
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
2626
nodegitContext->QueueWorker(worker);

generate/templates/manual/revwalk/file_history_walk.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ NAN_METHOD(GitRevwalk::FileHistoryWalk)
214214
baton->max_count = Nan::To<unsigned int>(info[1]).FromJust();
215215
baton->out = new std::vector<void *>;
216216
baton->out->reserve(baton->max_count);
217-
baton->walk = Nan::ObjectWrap::Unwrap<GitRevwalk>(info.This())->GetValue();
217+
baton->walk = Nan::ObjectWrap::Unwrap<GitRevwalk>(info.Holder())->GetValue();
218218

219219
Nan::Callback *callback = new Nan::Callback(Local<Function>::Cast(info[info.Length() - 1]));
220220
std::map<std::string, std::shared_ptr<nodegit::CleanupHandle>> cleanupHandles;
221221
FileHistoryWalkWorker *worker = new FileHistoryWalkWorker(baton, callback, cleanupHandles);
222-
worker->Reference<GitRevwalk>("fileHistoryWalk", info.This());
222+
worker->Reference<GitRevwalk>("fileHistoryWalk", info.Holder());
223223

224224
nodegit::Context *nodegitContext = reinterpret_cast<nodegit::Context *>(info.Data().As<External>()->Value());
225225
nodegitContext->QueueWorker(worker);

0 commit comments

Comments
 (0)