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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

Issue 2405793002: documentStyleSheetCollection() is always non-null. (Closed)
Patch Set: Created 4 years, 2 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 | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngine.h
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.h b/third_party/WebKit/Source/core/dom/StyleEngine.h
index 132c3c1796aa30345f3a844ded4cbf69dee2a157..b6323caf35a0ea44cf0fb16ed534be43ace5ac51 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h
@@ -255,12 +255,14 @@ class CORE_EXPORT StyleEngine final
const String& text,
TextPosition startPosition);
- const DocumentStyleSheetCollection* documentStyleSheetCollection() const {
- return m_documentStyleSheetCollection.get();
+ const DocumentStyleSheetCollection& documentStyleSheetCollection() const {
+ DCHECK(m_documentStyleSheetCollection.get());
+ return *m_documentStyleSheetCollection.get();
meade_UTC10 2016/10/11 05:53:24 The .get seems redundant - can this just be DCHE
rune 2016/10/12 09:19:19 Done.
}
- DocumentStyleSheetCollection* documentStyleSheetCollection() {
- return m_documentStyleSheetCollection.get();
+ DocumentStyleSheetCollection& documentStyleSheetCollection() {
+ DCHECK(m_documentStyleSheetCollection.get());
+ return *m_documentStyleSheetCollection.get();
}
void updateActiveStyleSheetsInShadow(
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698