Lines Matching refs:V8
1 // Copyright 2013 the V8 project authors. All rights reserved.
30 #include "v8.h"
32 namespace v8 {
36 v8::Handle<v8::FunctionTemplate> FreeBufferExtension::GetNativeFunctionTemplate(
37 v8::Isolate* isolate,
38 v8::Handle<v8::String> str) {
39 return v8::FunctionTemplate::New(FreeBufferExtension::FreeBuffer);
44 const v8::FunctionCallbackInfo<v8::Value>& args) {
45 v8::Handle<v8::ArrayBuffer> arrayBuffer = args[0].As<v8::ArrayBuffer>();
46 v8::ArrayBuffer::Contents contents = arrayBuffer->Externalize();
47 V8::ArrayBufferAllocator()->Free(contents.Data(), contents.ByteLength());
57 static v8::DeclareExtension declaration(&buffer_free_extension);
60 } } // namespace v8::internal