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

Unified Diff: third_party/WebKit/Source/core/html/forms/FileInputType.cpp

Issue 2097313002: Replace ASSERT macros with DCHECK, etc. in core/html/forms/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/forms/FileInputType.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/FileInputType.cpp b/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
index 98353fbca72a2cd287551efe12602637088a6d75..baca893ac0c63dba86492bfb6cb78a4f3b44d1d5 100644
--- a/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
+++ b/third_party/WebKit/Source/core/html/forms/FileInputType.cpp
@@ -224,7 +224,7 @@ FileList* FileInputType::createFileList(const Vector<FileChooserFileInfo>& files
rootPath = directoryName(rootPath);
}
rootPath = directoryName(rootPath);
- ASSERT(rootPath.length());
+ DCHECK(rootPath.length());
int rootLength = rootPath.length();
if (rootPath[rootLength - 1] != '\\' && rootPath[rootLength - 1] != '/')
rootLength += 1;
@@ -257,7 +257,7 @@ void FileInputType::countUsage()
void FileInputType::createShadowSubtree()
{
- ASSERT(element().shadow());
+ DCHECK(element().shadow());
HTMLInputElement* button = HTMLInputElement::create(element().document(), 0, false);
button->setType(InputTypeNames::button);
button->setAttribute(valueAttr, AtomicString(locale().queryString(element().multiple() ? WebLocalizedString::FileButtonChooseMultipleFilesLabel : WebLocalizedString::FileButtonChooseFileLabel)));
@@ -267,14 +267,14 @@ void FileInputType::createShadowSubtree()
void FileInputType::disabledAttributeChanged()
{
- ASSERT(element().shadow());
+ DCHECK(element().shadow());
if (Element* button = toElement(element().userAgentShadowRoot()->firstChild()))
button->setBooleanAttribute(disabledAttr, element().isDisabledFormControl());
}
void FileInputType::multipleAttributeChanged()
{
- ASSERT(element().shadow());
+ DCHECK(element().shadow());
if (Element* button = toElement(element().userAgentShadowRoot()->firstChild()))
button->setAttribute(valueAttr, AtomicString(locale().queryString(element().multiple() ? WebLocalizedString::FileButtonChooseMultipleFilesLabel : WebLocalizedString::FileButtonChooseFileLabel)));
}

Powered by Google App Engine
This is Rietveld 408576698