Description[FastTextAutosizer] Keep m_blocksForFingerprint and m_fingerprints in sync
This patch keeps m_blocksForFingerprint in sync with m_fingerprints when
adding a new entry to m_fingerprints. Here's a quick summary about
these maps:
m_blocksForFingerprint maps Fingerprint -> list of RenderBlocks
m_fingerprints maps RenderObject -> Fingerprint
Previously, when adding a block to m_fingerprints we could neglect to
update m_blocksForFingerprint. By removing entries from
m_blocksForFingerprint before registering a new block fingerprint, we
prevent a crash on [1].
[1] http://www.chicagotribune.com/news/sns-wp-blm-news-bc-inventor01-20140301,0,255272.story
TEST=Added an assert that crashes all over our layouttests without this fix. Manually verified [1] no longer crashes.
BUG=348463
NOTRY=true
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168533
Patch Set 1 #Patch Set 2 : Cleanup, add an assert #Patch Set 3 : Refactr #
Total comments: 4
Patch Set 4 : Address reviewer comments #Messages
Total messages: 15 (0 generated)
|