Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Commit c179e4f

Browse files
committed
Update ArrayBuffer
1 parent 48fd313 commit c179e4f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ArrayBuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ namespace node {
7171
v8::Local<v8::Value> ptr = arrayBuffer->GetHiddenValue(v8::String::NewFromUtf8(isolate, "node::ArrayBuffer"));
7272

7373
if (ptr.IsEmpty()) {
74-
v8::ArrayBuffer::Contents content = arrayBuffer->Externalize();
75-
return ArrayBuffer::New(isolate, content.Data(), content.ByteLength());
74+
v8::Local<v8::Value> uintArray = v8::Uint8Array::New(arrayBuffer, 0, arrayBuffer->ByteLength());
75+
return ArrayBuffer::New(isolate, uintArray);
7676
} else {
7777
v8::Local<v8::External> ext = v8::Local<v8::External>::Cast(ptr);
7878
return static_cast<ArrayBuffer*>(ext->Value());

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-arraybuffer",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "node-v0.12.0 > v8::ArrayBuffer handler",
55
"author": "vmolsa <[email protected]> (http://github.com/vmolsa)",
66
"license": "MIT",

0 commit comments

Comments
 (0)