OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 }; | 61 }; |
62 | 62 |
63 ArrayBufferContents(); | 63 ArrayBufferContents(); |
64 ArrayBufferContents(unsigned num_elements, | 64 ArrayBufferContents(unsigned num_elements, |
65 unsigned element_byte_size, | 65 unsigned element_byte_size, |
66 SharingType is_shared, | 66 SharingType is_shared, |
67 InitializationPolicy); | 67 InitializationPolicy); |
68 ArrayBufferContents(DataHandle, | 68 ArrayBufferContents(DataHandle, |
69 unsigned size_in_bytes, | 69 unsigned size_in_bytes, |
70 SharingType is_shared); | 70 SharingType is_shared); |
| 71 ArrayBufferContents(ArrayBufferContents&&) = default; |
71 | 72 |
72 ~ArrayBufferContents(); | 73 ~ArrayBufferContents(); |
73 | 74 |
| 75 ArrayBufferContents& operator=(ArrayBufferContents&&) = default; |
| 76 |
74 void Neuter(); | 77 void Neuter(); |
75 | 78 |
76 void* Data() const { | 79 void* Data() const { |
77 DCHECK(!IsShared()); | 80 DCHECK(!IsShared()); |
78 return DataMaybeShared(); | 81 return DataMaybeShared(); |
79 } | 82 } |
80 void* DataShared() const { | 83 void* DataShared() const { |
81 DCHECK(IsShared()); | 84 DCHECK(IsShared()); |
82 return DataMaybeShared(); | 85 return DataMaybeShared(); |
83 } | 86 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 adjust_amount_of_external_allocated_memory_function_; | 179 adjust_amount_of_external_allocated_memory_function_; |
177 #if DCHECK_IS_ON() | 180 #if DCHECK_IS_ON() |
178 static AdjustAmountOfExternalAllocatedMemoryFunction | 181 static AdjustAmountOfExternalAllocatedMemoryFunction |
179 last_used_adjust_amount_of_external_allocated_memory_function_; | 182 last_used_adjust_amount_of_external_allocated_memory_function_; |
180 #endif | 183 #endif |
181 }; | 184 }; |
182 | 185 |
183 } // namespace WTF | 186 } // namespace WTF |
184 | 187 |
185 #endif // ArrayBufferContents_h | 188 #endif // ArrayBufferContents_h |
OLD | NEW |