OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "wtf/typed_arrays/ArrayPiece.h" | 5 #include "platform/wtf/typed_arrays/ArrayPiece.h" |
6 | 6 |
7 #include "wtf/Assertions.h" | 7 #include "platform/wtf/Assertions.h" |
8 #include "wtf/typed_arrays/ArrayBuffer.h" | 8 #include "platform/wtf/typed_arrays/ArrayBuffer.h" |
9 #include "wtf/typed_arrays/ArrayBufferView.h" | 9 #include "platform/wtf/typed_arrays/ArrayBufferView.h" |
10 | 10 |
11 namespace WTF { | 11 namespace WTF { |
12 | 12 |
13 ArrayPiece::ArrayPiece() { | 13 ArrayPiece::ArrayPiece() { |
14 initNull(); | 14 initNull(); |
15 } | 15 } |
16 | 16 |
17 ArrayPiece::ArrayPiece(void* data, unsigned byteLength) { | 17 ArrayPiece::ArrayPiece(void* data, unsigned byteLength) { |
18 initWithData(data, byteLength); | 18 initWithData(data, byteLength); |
19 } | 19 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 m_isNull = false; | 58 m_isNull = false; |
59 } | 59 } |
60 | 60 |
61 void ArrayPiece::initNull() { | 61 void ArrayPiece::initNull() { |
62 m_byteLength = 0; | 62 m_byteLength = 0; |
63 m_data = 0; | 63 m_data = 0; |
64 m_isNull = true; | 64 m_isNull = true; |
65 } | 65 } |
66 | 66 |
67 } // namespace WTF | 67 } // namespace WTF |
OLD | NEW |