Commit a6d0e6a7 authored by ishell's avatar ishell Committed by Commit bot

Check the slots being adding to the SlotsBuffer.

Related to crbug/454297.

Review URL: https://codereview.chromium.org/897523003

Cr-Commit-Position: refs/heads/master@{#26410}
parent 6f97a494
......@@ -266,6 +266,11 @@ class SlotsBuffer {
void Add(ObjectSlot slot) {
DCHECK(0 <= idx_ && idx_ < kNumberOfElements);
#ifdef DEBUG
if (slot >= reinterpret_cast<ObjectSlot>(NUMBER_OF_SLOT_TYPES)) {
DCHECK_NOT_NULL(*slot);
}
#endif
slots_[idx_++] = slot;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment