aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-04-26 15:00:43 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-04-26 15:00:43 +0400
commit38470503ec104aa90f0caa569b7774cb8210664e (patch)
tree520ecb297c30d729658ac1f9dba5769631e46381
parent33c566e087d14b7399f585c66084a50638d0affb (diff)
downloadnode-augeas-38470503ec104aa90f0caa569b7774cb8210664e.tar.gz
Fixed: callback function must be called unconditionally
-rw-r--r--libaugeas.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/libaugeas.cc b/libaugeas.cc
index 1800f8b..15c398a 100644
--- a/libaugeas.cc
+++ b/libaugeas.cc
@@ -626,15 +626,14 @@ void createAugeasWork(uv_work_t *req)
void createAugeasAfter(uv_work_t* req)
{
HandleScope scope;
+
CreateAugeasUV *her = static_cast<CreateAugeasUV*>(req->data);
+ Local<Value> argv[] = {LibAugeas::New(her->aug)};
- if (AUG_NOERROR == aug_error(her->aug)) {
- Local<Value> argv[] = {LibAugeas::New(her->aug)};
- TryCatch try_catch;
- her->callback->Call(Context::GetCurrent()->Global(), 1, argv);
- if (try_catch.HasCaught()) {
- node::FatalException(try_catch);
- }
+ TryCatch try_catch;
+ her->callback->Call(Context::GetCurrent()->Global(), 1, argv);
+ if (try_catch.HasCaught()) {
+ node::FatalException(try_catch);
}
her->callback.Dispose();