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

Unified Diff: gin/array_buffer.cc

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: rebase+comments 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
« no previous file with comments | « gin/array_buffer.h ('k') | gin/converter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/array_buffer.cc
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index 8b533540247bbd915cbf65c1b398427c710e63ee..e8e234e5db1a21a16407319e5c36bcb8d6ecde73 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -112,16 +112,14 @@ void ArrayBuffer::Private::WeakCallback(
// ArrayBuffer ----------------------------------------------------------------
-ArrayBuffer::ArrayBuffer(v8::Isolate* isolate)
- : isolate_(isolate),
- bytes_(0),
+ArrayBuffer::ArrayBuffer()
+ : bytes_(0),
num_bytes_(0) {
}
ArrayBuffer::ArrayBuffer(v8::Isolate* isolate,
- v8::Handle<v8::ArrayBuffer> array)
- : isolate_(isolate) {
- private_ = ArrayBuffer::Private::From(isolate_, array);
+ v8::Handle<v8::ArrayBuffer> array) {
+ private_ = ArrayBuffer::Private::From(isolate, array);
bytes_ = private_->buffer();
num_bytes_ = private_->length();
}
@@ -131,19 +129,19 @@ ArrayBuffer::~ArrayBuffer() {
// Converter<ArrayBuffer> -----------------------------------------------------
-bool Converter<ArrayBuffer>::FromV8(v8::Handle<v8::Value> val,
+bool Converter<ArrayBuffer>::FromV8(v8::Isolate* isolate,
+ v8::Handle<v8::Value> val,
ArrayBuffer* out) {
if (!val->IsArrayBuffer())
return false;
- *out = ArrayBuffer(out->isolate(), v8::Handle<v8::ArrayBuffer>::Cast(val));
+ *out = ArrayBuffer(isolate, v8::Handle<v8::ArrayBuffer>::Cast(val));
return true;
}
// ArrayBufferView ------------------------------------------------------------
-ArrayBufferView::ArrayBufferView(v8::Isolate* isolate)
- : array_buffer_(isolate),
- offset_(0),
+ArrayBufferView::ArrayBufferView()
+ : offset_(0),
num_bytes_(0) {
}
@@ -159,12 +157,12 @@ ArrayBufferView::~ArrayBufferView() {
// Converter<ArrayBufferView> -------------------------------------------------
-bool Converter<ArrayBufferView>::FromV8(v8::Handle<v8::Value> val,
+bool Converter<ArrayBufferView>::FromV8(v8::Isolate* isolate,
+ v8::Handle<v8::Value> val,
ArrayBufferView* out) {
if (!val->IsArrayBufferView())
return false;
- *out = ArrayBufferView(out->isolate(),
- v8::Handle<v8::ArrayBufferView>::Cast(val));
+ *out = ArrayBufferView(isolate, v8::Handle<v8::ArrayBufferView>::Cast(val));
return true;
}
« no previous file with comments | « gin/array_buffer.h ('k') | gin/converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698