Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: third_party/WebKit/Source/core/css/RuleSet.cpp

Issue 2740013002: Add a CHECK for null stuff in CompactPendingRules (Closed)
Patch Set: Add one more check + TODO Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/RuleSet.cpp
diff --git a/third_party/WebKit/Source/core/css/RuleSet.cpp b/third_party/WebKit/Source/core/css/RuleSet.cpp
index 8885cbdbd354535664a9b14cd8f2ca7a7b2038ef..e2505aec302b160d8de5397d75f1c9ac21be7a39 100644
--- a/third_party/WebKit/Source/core/css/RuleSet.cpp
+++ b/third_party/WebKit/Source/core/css/RuleSet.cpp
@@ -350,8 +350,13 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap,
CompactRuleMap& compactMap) {
for (auto& item : pendingMap) {
HeapLinkedStack<RuleData>* pendingRules = item.value.release();
+ // TODO(meade): crbug.com/694520
+ CHECK(!item.key.isNull());
+ CHECK(pendingRules);
CompactRuleMap::ValueType* compactRules =
compactMap.insert(item.key, nullptr).storedValue;
+ // TODO(meade): crbug.com/694520
+ CHECK(compactRules);
HeapTerminatedArrayBuilder<RuleData> builder(compactRules->value.release());
builder.grow(pendingRules->size());
@@ -365,7 +370,8 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap,
}
void RuleSet::compactRules() {
- ASSERT(m_pendingRules);
+ // TODO(meade): crbug.com/694520
+ CHECK(m_pendingRules);
PendingRuleMaps* pendingRules = m_pendingRules.release();
compactPendingRules(pendingRules->idRules, m_idRules);
compactPendingRules(pendingRules->classRules, m_classRules);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698