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

Unified Diff: third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp

Issue 2327643003: Replace ASSERT*() with DCHECK*() in core/fetch/ and core/loader/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Replace many DCHECK(a && b) with DCHECK(a) and DCHECK(b) Created 4 years, 3 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/fetch/CSSStyleSheetResource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp b/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp
index f44d16a3fcff570c6df1692629a9cc5dde000860..fbf63f8fb0e6b0ac76a1d58ba9bbdd3875d21867 100644
--- a/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp
+++ b/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp
@@ -39,7 +39,7 @@ namespace blink {
CSSStyleSheetResource* CSSStyleSheetResource::fetch(FetchRequest& request, ResourceFetcher* fetcher)
{
- ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone);
+ DCHECK_EQ(request.resourceRequest().frameType(), WebURLRequest::FrameTypeNone);
request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestContextStyle);
return toCSSStyleSheetResource(fetcher->requestResource(request, CSSStyleSheetResourceFactory()));
}
@@ -76,7 +76,7 @@ DEFINE_TRACE(CSSStyleSheetResource)
void CSSStyleSheetResource::didAddClient(ResourceClient* c)
{
- ASSERT(StyleSheetResourceClient::isExpectedType(c));
+ DCHECK(StyleSheetResourceClient::isExpectedType(c));
// Resource::didAddClient() must be before setCSSStyleSheet(),
// because setCSSStyleSheet() may cause scripts to be executed, which could destroy 'c' if it is an instance of HTMLLinkElement.
// see the comment of HTMLLinkElement::setCSSStyleSheet.
@@ -162,8 +162,8 @@ StyleSheetContents* CSSStyleSheetResource::restoreParsedStyleSheet(const CSSPars
return nullptr;
}
- ASSERT(m_parsedStyleSheetCache->isCacheableForResource());
- ASSERT(m_parsedStyleSheetCache->isReferencedFromResource());
+ DCHECK(m_parsedStyleSheetCache->isCacheableForResource());
+ DCHECK(m_parsedStyleSheetCache->isReferencedFromResource());
// Contexts must be identical so we know we would get the same exact result if we parsed again.
if (m_parsedStyleSheetCache->parserContext() != context)
@@ -176,7 +176,7 @@ StyleSheetContents* CSSStyleSheetResource::restoreParsedStyleSheet(const CSSPars
void CSSStyleSheetResource::saveParsedStyleSheet(StyleSheetContents* sheet)
{
- ASSERT(sheet && sheet->isCacheableForResource());
+ DCHECK(sheet && sheet->isCacheableForResource());
tkent 2016/09/13 08:52:09 Split it to who DCHECKs.
tkent 2016/09/13 08:53:03 oops, who -> two
hiroshige 2016/09/13 09:30:51 Done.
if (!memoryCache()->contains(this)) {
// This stylesheet resource did conflict with another resource and was

Powered by Google App Engine
This is Rietveld 408576698