| Index: test/cctest/test-typedarrays.cc
|
| diff --git a/test/cctest/test-typedarrays.cc b/test/cctest/test-typedarrays.cc
|
| index 966edb720ee5b7c03b97e3d2e919209505558f0d..d031048caeb833adc7b7e15dd3d4dc242e6e338b 100644
|
| --- a/test/cctest/test-typedarrays.cc
|
| +++ b/test/cctest/test-typedarrays.cc
|
| @@ -10,6 +10,7 @@
|
| #include "src/api.h"
|
| #include "src/heap/heap.h"
|
| #include "src/objects.h"
|
| +#include "src/v8.h"
|
|
|
| using namespace v8::internal;
|
|
|
| @@ -66,3 +67,15 @@ TEST(CopyContentsView) {
|
| "var a = new DataView(b, 2);");
|
| TestArrayBufferViewContents(env, true);
|
| }
|
| +
|
| +
|
| +TEST(AllocateNotExternal) {
|
| + LocalContext env;
|
| + v8::HandleScope scope(env->GetIsolate());
|
| + void* memory = V8::ArrayBufferAllocator()->Allocate(1024);
|
| + v8::Local<v8::ArrayBuffer> buffer =
|
| + v8::ArrayBuffer::New(env->GetIsolate(), memory, 1024,
|
| + v8::ArrayBufferCreationMode::kInternalized);
|
| + CHECK(!buffer->IsExternal());
|
| + CHECK_EQ(memory, buffer->GetContents().Data());
|
| +}
|
|
|