@@ -198,19 +198,15 @@ class AliasedBuffer {
198198 * Set position index to given value.
199199 */
200200 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_);
204202 buffer_[index] = value;
205203 }
206204
207205 /* *
208206 * Get value at position index
209207 */
210208 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_);
214210 return buffer_[index];
215211 }
216212
@@ -233,9 +229,9 @@ class AliasedBuffer {
233229 // Should only be used on an owning array, not one created as a sub array of
234230 // an owning `AliasedBuffer`.
235231 void reserve (size_t new_capacity) {
232+ DCHECK_GE (new_capacity, count_);
233+ DCHECK_EQ (byte_offset_, 0 );
236234#if defined(DEBUG) && DEBUG
237- CHECK_GE (new_capacity, count_);
238- CHECK_EQ (byte_offset_, 0 );
239235 CHECK (free_buffer_);
240236#endif
241237 const v8::HandleScope handle_scope (isolate_);
0 commit comments