From 7618ebbb8685c7bb6d1477791c524d667cae2f70 Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Wed, 27 Nov 2013 03:38:26 +0000 Subject: Convert the rest of the functions in core.cc to use CreateFunctionTemplate. BUG= Review URL: https://codereview.chromium.org/89723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237492 0039d316-1c4b-4281-b951-d872f2087c98 --- gin/array_buffer.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gin/array_buffer.h') diff --git a/gin/array_buffer.h b/gin/array_buffer.h index 30d45f9..3169fd0 100644 --- a/gin/array_buffer.h +++ b/gin/array_buffer.h @@ -24,6 +24,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { class ArrayBuffer { public: + ArrayBuffer(); explicit ArrayBuffer(v8::Isolate* isolate); ArrayBuffer(v8::Isolate* isolate, v8::Handle buffer); ~ArrayBuffer(); @@ -31,26 +32,25 @@ class ArrayBuffer { void* bytes() const { return bytes_; } size_t num_bytes() const { return num_bytes_; } - v8::Isolate* isolate() const { return isolate_; } - private: class Private; - v8::Isolate* isolate_; scoped_refptr private_; void* bytes_; size_t num_bytes_; + + DISALLOW_COPY(ArrayBuffer); }; template<> struct Converter { - static bool FromV8(v8::Handle val, + static bool FromV8(v8::Isolate* isolate, v8::Handle val, ArrayBuffer* out); }; class ArrayBufferView { public: - explicit ArrayBufferView(v8::Isolate* isolate); + ArrayBufferView(); ArrayBufferView(v8::Isolate* isolate, v8::Handle view); ~ArrayBufferView(); @@ -59,17 +59,17 @@ class ArrayBufferView { } size_t num_bytes() const { return num_bytes_; } - v8::Isolate* isolate() const { return array_buffer_.isolate(); } - private: ArrayBuffer array_buffer_; size_t offset_; size_t num_bytes_; + + DISALLOW_COPY(ArrayBufferView); }; template<> struct Converter { - static bool FromV8(v8::Handle val, + static bool FromV8(v8::Isolate* isolate, v8::Handle val, ArrayBufferView* out); }; -- cgit v1.1