mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
typed arrays: root JS objects in HandleScope with Local<>
This commit is contained in:
@@ -225,7 +225,7 @@ class TypedArray {
|
||||
length = obj->Get(v8::String::New("length"))->Uint32Value();
|
||||
|
||||
// TODO(deanm): Handle integer overflow.
|
||||
v8::Handle<v8::Value> argv[1] = {
|
||||
v8::Local<v8::Value> argv[1] = {
|
||||
v8::Integer::NewFromUnsigned(length * TBytes)};
|
||||
buffer = ArrayBuffer::GetTemplate()->
|
||||
GetFunction()->NewInstance(1, argv);
|
||||
@@ -253,7 +253,7 @@ class TypedArray {
|
||||
|
||||
length = args[0]->Uint32Value();
|
||||
// TODO(deanm): Handle integer overflow.
|
||||
v8::Handle<v8::Value> argv[1] = {
|
||||
v8::Local<v8::Value> argv[1] = {
|
||||
v8::Integer::NewFromUnsigned(length * TBytes)};
|
||||
|
||||
buffer = ArrayBuffer::GetTemplate()->
|
||||
@@ -431,7 +431,7 @@ class TypedArray {
|
||||
args.This()->Get(v8::String::New("byteOffset"))->Uint32Value();
|
||||
|
||||
// Call through to the ArrayBuffer, byteOffset, length constructor.
|
||||
v8::Handle<v8::Value> argv[] = {
|
||||
v8::Local<v8::Value> argv[] = {
|
||||
args.This()->Get(v8::String::New("buffer")),
|
||||
v8::Integer::New(byte_offset),
|
||||
v8::Integer::New(end - begin)};
|
||||
|
||||
Reference in New Issue
Block a user