| Index: samples/process.cc
|
| diff --git a/samples/process.cc b/samples/process.cc
|
| index 54c8376e051f8010d690349ee6a8e556594bb8db..29ddb5cf2f187c4c346ac1e633f923c0f78388f4 100644
|
| --- a/samples/process.cc
|
| +++ b/samples/process.cc
|
| @@ -38,17 +38,6 @@
|
| using namespace std;
|
| using namespace v8;
|
|
|
| -class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
| - public:
|
| - virtual void* Allocate(size_t length) {
|
| - void* data = AllocateUninitialized(length);
|
| - return data == NULL ? data : memset(data, 0, length);
|
| - }
|
| - virtual void* AllocateUninitialized(size_t length) { return malloc(length); }
|
| - virtual void Free(void* data, size_t) { free(data); }
|
| -};
|
| -
|
| -
|
| // These interfaces represent an existing request processing interface.
|
| // The idea is to imagine a real application that uses these interfaces
|
| // and then add scripting capabilities that allow you to interact with
|
| @@ -699,9 +688,9 @@ int main(int argc, char* argv[]) {
|
| fprintf(stderr, "No script was specified.\n");
|
| return 1;
|
| }
|
| - ArrayBufferAllocator array_buffer_allocator;
|
| Isolate::CreateParams create_params;
|
| - create_params.array_buffer_allocator = &array_buffer_allocator;
|
| + create_params.array_buffer_allocator =
|
| + v8::ArrayBuffer::Allocator::NewDefaultAllocator();
|
| Isolate* isolate = Isolate::New(create_params);
|
| Isolate::Scope isolate_scope(isolate);
|
| HandleScope scope(isolate);
|
|
|