Skip to content

Commit

Permalink
Replace NanAssignPersistent by .Reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Aug 8, 2015
1 parent 4aa5663 commit d98ae29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/liblzma-node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ namespace lzma {
explicit LZMAStream();
~LZMAStream();

typedef Nan::Persistent<Function> ConstructorPersistent;
static ConstructorPersistent constructor;
static Nan::Persistent<Function> constructor;
static NAN_METHOD(New);

static void _failMissingSelf(const Nan::FunctionCallbackInfo<Value>& info);
Expand Down
2 changes: 1 addition & 1 deletion src/lzma-stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void LZMAStream::Init(Local<Object> exports) {
tpl->PrototypeTemplate()->Set(NewString("streamDecoder_"), Nan::New<FunctionTemplate>(StreamDecoder)->GetFunction());
tpl->PrototypeTemplate()->Set(NewString("autoDecoder_"), Nan::New<FunctionTemplate>(AutoDecoder)->GetFunction());
tpl->PrototypeTemplate()->Set(NewString("aloneDecoder_"), Nan::New<FunctionTemplate>(AloneDecoder)->GetFunction());
NanAssignPersistent(constructor, tpl);
constructor.Reset(tpl->GetFunction());
exports->Set(NewString("Stream"), Nan::New<Function>(constructor));
}

Expand Down

0 comments on commit d98ae29

Please sign in to comment.