| Index: src/d8.cc
|
| diff --git a/src/d8.cc b/src/d8.cc
|
| index 976510c464009a19f91bc9e7a0101decdc536fe4..ce2afd34d4b483d61165316e9ad1c1209ac4b7f9 100644
|
| --- a/src/d8.cc
|
| +++ b/src/d8.cc
|
| @@ -488,14 +488,7 @@ Handle<Value> Shell::CreateExternalArray(const Arguments& args,
|
| byteLength = length * element_size;
|
| byteOffset = 0;
|
|
|
| - Handle<Object> global = Context::GetCurrent()->Global();
|
| - Handle<Value> array_buffer = global->Get(String::New("ArrayBuffer"));
|
| - ASSERT(!try_catch.HasCaught() && array_buffer->IsFunction());
|
| - Handle<Value> buffer_args[] = { Uint32::New(byteLength) };
|
| - Handle<Value> result = Handle<Function>::Cast(array_buffer)->NewInstance(
|
| - 1, buffer_args);
|
| - if (try_catch.HasCaught()) return result;
|
| - buffer = result->ToObject();
|
| + buffer = CreateExternalArrayBuffer(Object::New(), byteLength)->ToObject();
|
| }
|
|
|
| Handle<Object> array = CreateExternalArray(
|
|
|