Commit f84d6e75 authored by meade's avatar meade Committed by Commit bot

Add a CHECK for null stuff in CompactPendingRules

This should be impossible, but we'd like to try it in canary
to try and figure out what's going on in the linked bug.

This should be reverted by 17 March.

BUG=694520

Review-Url: https://codereview.chromium.org/2740013002
Cr-Commit-Position: refs/heads/master@{#455697}
parent b823112b
...@@ -350,8 +350,13 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap, ...@@ -350,8 +350,13 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap,
CompactRuleMap& compactMap) { CompactRuleMap& compactMap) {
for (auto& item : pendingMap) { for (auto& item : pendingMap) {
HeapLinkedStack<RuleData>* pendingRules = item.value.release(); HeapLinkedStack<RuleData>* pendingRules = item.value.release();
// TODO(meade): crbug.com/694520
CHECK(!item.key.isNull());
CHECK(pendingRules);
CompactRuleMap::ValueType* compactRules = CompactRuleMap::ValueType* compactRules =
compactMap.insert(item.key, nullptr).storedValue; compactMap.insert(item.key, nullptr).storedValue;
// TODO(meade): crbug.com/694520
CHECK(compactRules);
HeapTerminatedArrayBuilder<RuleData> builder(compactRules->value.release()); HeapTerminatedArrayBuilder<RuleData> builder(compactRules->value.release());
builder.grow(pendingRules->size()); builder.grow(pendingRules->size());
...@@ -365,7 +370,8 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap, ...@@ -365,7 +370,8 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap,
} }
void RuleSet::compactRules() { void RuleSet::compactRules() {
ASSERT(m_pendingRules); // TODO(meade): crbug.com/694520
CHECK(m_pendingRules);
PendingRuleMaps* pendingRules = m_pendingRules.release(); PendingRuleMaps* pendingRules = m_pendingRules.release();
compactPendingRules(pendingRules->idRules, m_idRules); compactPendingRules(pendingRules->idRules, m_idRules);
compactPendingRules(pendingRules->classRules, m_classRules); compactPendingRules(pendingRules->classRules, m_classRules);
......
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