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

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

Issue 2258033002: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace ASSERT()s with DCHECK*() in core/html/*.{cpp,h}. Created 4 years, 4 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
Index: third_party/WebKit/Source/core/html/HTMLImageElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
index 25baa498a4e77f62148abf6594c18cb95eb9871e..858f7595cbdfe1fb7acf2703792527a7f75bdcdf 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.cpp
@@ -201,7 +201,7 @@ HTMLFormElement* HTMLImageElement::formOwner() const
void HTMLImageElement::formRemovedFromTree(const Node& formRoot)
{
- ASSERT(m_form);
+ DCHECK(m_form);
if (NodeTraversal::highestAncestorOrSelf(*this) != formRoot)
resetFormOwner();
}
@@ -296,7 +296,7 @@ static bool supportedImageType(const String& type)
// http://picture.responsiveimages.org/#update-source-set
ImageCandidate HTMLImageElement::findBestFitImageFromPictureParent()
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
Node* parent = parentNode();
m_source = nullptr;
if (!parent || !isHTMLPictureElement(*parent))
@@ -689,7 +689,7 @@ void HTMLImageElement::forceReload() const
ScriptPromise HTMLImageElement::createImageBitmap(ScriptState* scriptState, EventTarget& eventTarget, Optional<IntRect> cropRect, const ImageBitmapOptions& options, ExceptionState& exceptionState)
{
- ASSERT(eventTarget.toLocalDOMWindow());
+ DCHECK(eventTarget.toLocalDOMWindow());
if ((cropRect && !ImageBitmap::isSourceSizeValid(cropRect->width(), cropRect->height(), exceptionState))
|| !ImageBitmap::isSourceSizeValid(bitmapSourceSize().width(), bitmapSourceSize().height(), exceptionState))
return ScriptPromise();
@@ -829,7 +829,7 @@ IntSize HTMLImageElement::bitmapSourceSize() const
if (!image)
return IntSize();
LayoutSize lSize = image->imageSize(LayoutObject::shouldRespectImageOrientation(layoutObject()), 1.0f);
- ASSERT(lSize.fraction().isZero());
+ DCHECK(lSize.fraction().isZero());
return IntSize(lSize.width(), lSize.height());
}

Powered by Google App Engine
This is Rietveld 408576698