Commit 7ba12573 authored by ishell's avatar ishell Committed by Commit bot

[stubs] Fix flaky failures of cctest/test-code-stub-assembler/SeededNumberDictionaryLookup.

Dictionary::Add() must not be called for existing keys.

Review-Url: https://codereview.chromium.org/2044003004
Cr-Commit-Position: refs/heads/master@{#36792}
parent 9eb756fb
......@@ -696,6 +696,7 @@ void TestNumberDictionaryLookup() {
for (int i = 0; i < kKeysCount; i++) {
int random_key = rand_gen.NextInt(Smi::kMaxValue);
keys[i] = static_cast<uint32_t>(random_key);
if (dictionary->FindEntry(keys[i]) != Dictionary::kNotFound) continue;
dictionary = Dictionary::Add(dictionary, keys[i], fake_value, fake_details);
}
......
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