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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGURIReference.cpp

Issue 2738863002: Replace ASSERT with DCHECK in core/svg/ (Closed)
Patch Set: Split DCHECKS wherever possible Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 29 matching lines...) Expand all
40 m_closure(std::move(closure)) {} 40 m_closure(std::move(closure)) {}
41 41
42 private: 42 private:
43 void idTargetChanged() override { (*m_closure)(); } 43 void idTargetChanged() override { (*m_closure)(); }
44 std::unique_ptr<WTF::Closure> m_closure; 44 std::unique_ptr<WTF::Closure> m_closure;
45 }; 45 };
46 } 46 }
47 47
48 SVGURIReference::SVGURIReference(SVGElement* element) 48 SVGURIReference::SVGURIReference(SVGElement* element)
49 : m_href(SVGAnimatedHref::create(element)) { 49 : m_href(SVGAnimatedHref::create(element)) {
50 ASSERT(element); 50 DCHECK(element);
51 m_href->addToPropertyMap(element); 51 m_href->addToPropertyMap(element);
52 } 52 }
53 53
54 DEFINE_TRACE(SVGURIReference) { 54 DEFINE_TRACE(SVGURIReference) {
55 visitor->trace(m_href); 55 visitor->trace(m_href);
56 } 56 }
57 57
58 bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName) { 58 bool SVGURIReference::isKnownAttribute(const QualifiedName& attrName) {
59 return SVGAnimatedHref::isKnownAttribute(attrName); 59 return SVGAnimatedHref::isKnownAttribute(attrName);
60 } 60 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 143 }
144 144
145 void SVGURIReference::unobserveTarget(Member<IdTargetObserver>& observer) { 145 void SVGURIReference::unobserveTarget(Member<IdTargetObserver>& observer) {
146 if (!observer) 146 if (!observer)
147 return; 147 return;
148 observer->unregister(); 148 observer->unregister();
149 observer = nullptr; 149 observer = nullptr;
150 } 150 }
151 151
152 } // namespace blink 152 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGTransformList.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698