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

Side by Side Diff: gin/array_buffer.cc

Issue 289003007: Fix gin's array buffer class for component build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gin/array_buffer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gin/array_buffer.h" 8 #include "gin/array_buffer.h"
9 #include "gin/per_isolate_data.h" 9 #include "gin/per_isolate_data.h"
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ArrayBufferView::ArrayBufferView(v8::Isolate* isolate, 168 ArrayBufferView::ArrayBufferView(v8::Isolate* isolate,
169 v8::Handle<v8::ArrayBufferView> view) 169 v8::Handle<v8::ArrayBufferView> view)
170 : array_buffer_(isolate, view->Buffer()), 170 : array_buffer_(isolate, view->Buffer()),
171 offset_(view->ByteOffset()), 171 offset_(view->ByteOffset()),
172 num_bytes_(view->ByteLength()) { 172 num_bytes_(view->ByteLength()) {
173 } 173 }
174 174
175 ArrayBufferView::~ArrayBufferView() { 175 ArrayBufferView::~ArrayBufferView() {
176 } 176 }
177 177
178 ArrayBufferView& ArrayBufferView::operator=(const ArrayBufferView& other) {
179 array_buffer_ = other.array_buffer_;
180 offset_ = other.offset_;
181 num_bytes_ = other.num_bytes_;
182 return *this;
183 }
184
185
178 // Converter<ArrayBufferView> ------------------------------------------------- 186 // Converter<ArrayBufferView> -------------------------------------------------
179 187
180 bool Converter<ArrayBufferView>::FromV8(v8::Isolate* isolate, 188 bool Converter<ArrayBufferView>::FromV8(v8::Isolate* isolate,
181 v8::Handle<v8::Value> val, 189 v8::Handle<v8::Value> val,
182 ArrayBufferView* out) { 190 ArrayBufferView* out) {
183 if (!val->IsArrayBufferView()) 191 if (!val->IsArrayBufferView())
184 return false; 192 return false;
185 *out = ArrayBufferView(isolate, v8::Handle<v8::ArrayBufferView>::Cast(val)); 193 *out = ArrayBufferView(isolate, v8::Handle<v8::ArrayBufferView>::Cast(val));
186 return true; 194 return true;
187 } 195 }
188 196
189 } // namespace gin 197 } // namespace gin
OLDNEW
« no previous file with comments | « gin/array_buffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698