Browse Source

typed arrays: root JS objects in HandleScope with Local<>

v0.9.1-release
Ben Noordhuis 13 years ago
parent
commit
9d1fde7519
  1. 6
      src/v8_typed_array.cc

6
src/v8_typed_array.cc

@ -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)};

Loading…
Cancel
Save