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

Unified Diff: third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 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/dom/ProcessingInstruction.cpp
diff --git a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
index 86abb2ddbd9a4cb1a68cd243de3f498b5fee2959..8519c28c6ee81d5204056f84d7c2ca07bf0b8a41 100644
--- a/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
+++ b/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
@@ -60,7 +60,7 @@ ProcessingInstruction::~ProcessingInstruction()
clearSheet();
// FIXME: ProcessingInstruction should not be in document here.
- // However, if we add ASSERT(!inShadowIncludingDocument()), fast/xsl/xslt-entity.xml
+ // However, if we add DCHECK(!inShadowIncludingDocument()), fast/xsl/xslt-entity.xml
// crashes. We need to investigate ProcessingInstruction lifetime.
if (inShadowIncludingDocument() && m_isCSS)
document().styleEngine().removeStyleSheetCandidateNode(this);
@@ -204,11 +204,11 @@ bool ProcessingInstruction::sheetLoaded()
void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& baseURL, const String& charset, const CSSStyleSheetResource* sheet)
{
if (!inShadowIncludingDocument()) {
- ASSERT(!m_sheet);
+ DCHECK(!m_sheet);
return;
}
- ASSERT(m_isCSS);
+ DCHECK(m_isCSS);
CSSParserContext parserContext(document(), 0, baseURL, charset);
RawPtr<StyleSheetContents> newSheet = StyleSheetContents::create(href, parserContext);
@@ -229,11 +229,11 @@ void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas
void ProcessingInstruction::setXSLStyleSheet(const String& href, const KURL& baseURL, const String& sheet)
{
if (!inShadowIncludingDocument()) {
- ASSERT(!m_sheet);
+ DCHECK(!m_sheet);
return;
}
- ASSERT(m_isXSL);
+ DCHECK(m_isXSL);
m_sheet = XSLStyleSheet::create(this, href, baseURL);
RawPtr<Document> protect(&document());
OwnPtr<IncrementLoadEventDelayCount> delay = IncrementLoadEventDelayCount::create(document());
@@ -284,7 +284,7 @@ void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
RawPtr<StyleSheet> removedSheet = m_sheet;
if (m_sheet) {
- ASSERT(m_sheet->ownerNode() == this);
+ DCHECK_EQ(m_sheet->ownerNode(), this);
clearSheet();
}
@@ -298,7 +298,7 @@ void ProcessingInstruction::removedFrom(ContainerNode* insertionPoint)
void ProcessingInstruction::clearSheet()
{
- ASSERT(m_sheet);
+ DCHECK(m_sheet);
if (m_sheet->isLoading())
document().styleEngine().removePendingSheet(this);
m_sheet.release()->clearOwnerNode();

Powered by Google App Engine
This is Rietveld 408576698