Skip to content

Commit

Permalink
Merge pull request #443 from mikemorris/master
Browse files Browse the repository at this point in the history
EscapableHandleScope in Nan::NewBuffer for Node 0.8 and 0.10
  • Loading branch information
kkoopa committed Sep 8, 2015
2 parents 7b2ec2b + b1654d7 commit a71301e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -1026,12 +1026,12 @@ class Utf8String {
, node::Buffer::free_callback callback
, void *hint
) {
HandleScope scope;
EscapableHandleScope scope;
// arbitrary buffer lengths requires
// NODE_MODULE_VERSION >= IOJS_3_0_MODULE_VERSION
assert(length <= imp::kMaxLength && "too large buffer");
return MaybeLocal<v8::Object>(
New(node::Buffer::New(data, length, callback, hint)->handle_));
scope.Escape(New(node::Buffer::New(data, length, callback, hint)->handle_)));
}

NAN_INLINE MaybeLocal<v8::Object> CopyBuffer(
Expand Down

0 comments on commit a71301e

Please sign in to comment.