Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: gin/array_buffer.h

Issue 89723002: Convert the rest of the functions in core.cc to use CreateFunctionTemplate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: realized didn't need changes to ArrayBuffer::Private Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gin/array_buffer.h
diff --git a/gin/array_buffer.h b/gin/array_buffer.h
index 30d45f91d3c0e78987ffbee9b629d59ad596c502..05e86f77c72cf909bca36b76c5b9e3c701b42d45 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<v8::ArrayBuffer> buffer);
~ArrayBuffer();
@@ -31,12 +32,9 @@ class ArrayBuffer {
void* bytes() const { return bytes_; }
size_t num_bytes() const { return num_bytes_; }
- v8::Isolate* isolate() const { return isolate_; }
-
private:
class Private;
abarth-chromium 2013/11/27 00:20:10 If you're not going to move this into the header,
Aaron Boodman 2013/11/27 00:34:43 Good idea, but we need assign because Arguments::G
- v8::Isolate* isolate_;
scoped_refptr<Private> private_;
void* bytes_;
size_t num_bytes_;
@@ -44,13 +42,13 @@ class ArrayBuffer {
template<>
struct Converter<ArrayBuffer> {
- static bool FromV8(v8::Handle<v8::Value> val,
+ static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
ArrayBuffer* out);
};
class ArrayBufferView {
public:
- explicit ArrayBufferView(v8::Isolate* isolate);
+ ArrayBufferView();
ArrayBufferView(v8::Isolate* isolate, v8::Handle<v8::ArrayBufferView> view);
~ArrayBufferView();
@@ -59,8 +57,6 @@ 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_;
@@ -69,7 +65,7 @@ class ArrayBufferView {
template<>
struct Converter<ArrayBufferView> {
- static bool FromV8(v8::Handle<v8::Value> val,
+ static bool FromV8(v8::Isolate* isolate, v8::Handle<v8::Value> val,
ArrayBufferView* out);
};
« no previous file with comments | « gin/arguments.cc ('k') | gin/array_buffer.cc » ('j') | mojo/public/bindings/js/core.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698