Chromium Code Reviews

Unified Diff: Source/core/css/resolver/FontBuilder.cpp

Issue 686723002: Improve RAII of StyleResolverState. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix assertions. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: Source/core/css/resolver/FontBuilder.cpp
diff --git a/Source/core/css/resolver/FontBuilder.cpp b/Source/core/css/resolver/FontBuilder.cpp
index a0cc60f30b974333e9b440d58ec892fdcb5ed2ae..28c8331fd6445d3be1426913c759873c133c1b57 100644
--- a/Source/core/css/resolver/FontBuilder.cpp
+++ b/Source/core/css/resolver/FontBuilder.cpp
@@ -60,11 +60,12 @@ private:
FontDescription m_fontDescription;
};
-FontBuilder::FontBuilder(const Document& document)
+FontBuilder::FontBuilder(const Document& document, RenderStyle* style)
: m_document(document)
- , m_style(nullptr)
+ , m_style(style)
, m_fontDirty(false)
{
+ ASSERT(style);
ASSERT(document.frame());
}

Powered by Google App Engine