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

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: Rebase. 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/DocumentResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b5aeeb8612655877e005ea764f75d8f1e2601e52 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,8 @@ StyleSheetContents* CSSStyleSheetResource::restoreParsedStyleSheet(const CSSPars
void CSSStyleSheetResource::saveParsedStyleSheet(StyleSheetContents* sheet)
{
- ASSERT(sheet && sheet->isCacheableForResource());
+ DCHECK(sheet);
+ DCHECK(sheet->isCacheableForResource());
if (!memoryCache()->contains(this)) {
// This stylesheet resource did conflict with another resource and was
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/DocumentResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698