Index: src/extensions/free-buffer-extension.cc |
diff --git a/src/extensions/free-buffer-extension.cc b/src/extensions/free-buffer-extension.cc |
index e8c7732b66f08f8fb8e3796477fc3e02e03ac9c3..c880d75d0b32733a84c4b031c07bed876357621a 100644 |
--- a/src/extensions/free-buffer-extension.cc |
+++ b/src/extensions/free-buffer-extension.cc |
@@ -22,7 +22,9 @@ void FreeBufferExtension::FreeBuffer( |
const v8::FunctionCallbackInfo<v8::Value>& args) { |
v8::Handle<v8::ArrayBuffer> arrayBuffer = args[0].As<v8::ArrayBuffer>(); |
v8::ArrayBuffer::Contents contents = arrayBuffer->Externalize(); |
- V8::ArrayBufferAllocator()->Free(contents.Data(), contents.ByteLength()); |
+ Isolate* isolate = reinterpret_cast<Isolate*>(args.GetIsolate()); |
+ isolate->array_buffer_allocator()->Free(contents.Data(), |
+ contents.ByteLength()); |
} |
} } // namespace v8::internal |