Skip to content

Commit

Permalink
EscapableHandleScope in Nan::NewBuffer for Node 0.8 and 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemorris committed Sep 8, 2015
1 parent 7b2ec2b commit b1654d7
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 b1654d7

Please sign in to comment.