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

Unified Diff: third_party/WebKit/Source/core/svg/SVGUseElement.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/svg/SVGUseElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
index 0091e379c49c51509fc433fdddcdec468b55db6e..17d3f5df7245cfc824dd22ba984b7d339bcf7d87 100644
--- a/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
@@ -451,7 +451,8 @@ void SVGUseElement::buildShadowAndInstanceTree(SVGElement& target) {
// If the instance root was a <use>, it could have been replaced now, so
// reset |m_targetElementInstance|.
- m_targetElementInstance = toSVGElement(shadowTreeRootElement->firstChild());
+ m_targetElementInstance =
+ toSVGElementOrDie(shadowTreeRootElement->firstChild());
ASSERT(m_targetElementInstance->parentNode() == shadowTreeRootElement);
// Update relative length information.
« no previous file with comments | « third_party/WebKit/Source/core/html/shadow/DateTimeEditElement.cpp ('k') | third_party/WebKit/Source/wtf/Assertions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698