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

Unified Diff: third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp

Issue 2534873004: Avoid unchecked casts in UA shadow DOM. (Closed)
Patch Set: Created 4 years, 1 month 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
Index: third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp b/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
index 5a34cbf08bc6c35a3bda87f430fd84fe50aa0e87..e5e515e5bfe3ebddb838cbbdb143cd0ef4cfb03a 100644
--- a/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLDetailsElement.cpp
@@ -112,9 +112,9 @@ Element* HTMLDetailsElement::findMainSummary() const {
return summary;
HTMLContentElement* content =
- toHTMLContentElement(userAgentShadowRoot()->firstChild());
+ toHTMLContentElementOrDie(userAgentShadowRoot()->firstChild());
DCHECK(content->firstChild());
- DCHECK(isHTMLSummaryElement(*content->firstChild()));
+ CHECK(isHTMLSummaryElement(*content->firstChild()));
return toElement(content->firstChild());
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.h ('k') | third_party/WebKit/Source/core/html/HTMLKeygenElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698