@@ -198,19 +198,15 @@ class AliasedBuffer {
198
198
* Set position index to given value.
199
199
*/
200
200
inline void SetValue (const size_t index, NativeT value) {
201
- #if defined(DEBUG) && DEBUG
202
- CHECK_LT (index , count_);
203
- #endif
201
+ DCHECK_LT (index , count_);
204
202
buffer_[index ] = value;
205
203
}
206
204
207
205
/* *
208
206
* Get value at position index
209
207
*/
210
208
inline const NativeT GetValue (const size_t index) const {
211
- #if defined(DEBUG) && DEBUG
212
- CHECK_LT (index , count_);
213
- #endif
209
+ DCHECK_LT (index , count_);
214
210
return buffer_[index ];
215
211
}
216
212
@@ -233,9 +229,9 @@ class AliasedBuffer {
233
229
// Should only be used on an owning array, not one created as a sub array of
234
230
// an owning `AliasedBuffer`.
235
231
void reserve (size_t new_capacity) {
232
+ DCHECK_GE (new_capacity, count_);
233
+ DCHECK_EQ (byte_offset_, 0 );
236
234
#if defined(DEBUG) && DEBUG
237
- CHECK_GE (new_capacity, count_);
238
- CHECK_EQ (byte_offset_, 0 );
239
235
CHECK (free_buffer_);
240
236
#endif
241
237
const v8::HandleScope handle_scope (isolate_);
0 commit comments