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

Issue 2327643003: Replace ASSERT*() with DCHECK*() in core/fetch/ and core/loader/ (Closed)

Created:
4 years, 3 months ago by hiroshige
Modified:
4 years, 3 months ago
Reviewers:
tkent, yhirano
CC:
blink-reviews, blink-reviews-style_chromium.org, chromium-reviews, eric.carlson_apple.com, fs, gavinp+prerender_chromium.org, gavinp+loader_chromium.org, gasubic, Nate Chapin, loading-reviews_chromium.org, loading-reviews+fetch_chromium.org, michaeln, nessy, tyoshino+watch_chromium.org, vcarbune.chromium, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace ASSERT*() with DCHECK*() in core/fetch/ and core/loader/ sed -i 's/ ASSERT(/ DCHECK(/g' sed -i 's/ RELEASE_ASSERT(/ CHECK(/g' sed -i 's/ ASSERT_NOT_REACHED(/ NOTREACHED(/g' sed -i 's/ ASSERT_WITH_SECURITY_IMPLICATION(/ SECURITY_DCHECK(/g' perl -npe '$_ =~ s/ASSERT_UNUSED\((.*?), (.*)\);$/DCHECK($2);/g' for `find third_party/WebKit/Source/core/{fetch,loader}/ -name '*.*'`. This CL replaces - DCHECK(a == b) with DCHECK_EQ(a, b) - DCHECK(a && b) with DCHECK(a) and DCHECK(b) etc. manually. BUG=645395, 596760 Committed: https://crrev.com/b4c242bce2dd77f07a5d2b051088688f1ebbab86 Cr-Commit-Position: refs/heads/master@{#418606}

Patch Set 1 #

Patch Set 2 : fix signs #

Patch Set 3 : ASSERT_UNUSED #

Total comments: 134

Patch Set 4 : DCHECK_EQ Etc in fetch/loader #

Patch Set 5 : Remove ALLOW_UNUSED_LOCAL() #

Patch Set 6 : Replace many DCHECK(a && b) with DCHECK(a) and DCHECK(b) #

Total comments: 5

Patch Set 7 : Split DCHECK()s with && #

Patch Set 8 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -304 lines) Patch
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp View 1 2 3 4 5 6 4 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/DocumentResource.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchRequest.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.cpp View 1 2 3 6 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 4 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MemoryCache.cpp View 1 2 3 4 5 20 chunks +34 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/MultipartImageResourceParser.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResource.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/RawResource.cpp View 1 2 3 3 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 13 chunks +15 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 13 chunks +21 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 2 3 7 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ScriptResource.cpp View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoadTiming.cpp View 1 2 3 4 5 2 chunks +7 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 16 chunks +29 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp View 1 2 3 4 20 chunks +43 lines, -43 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentWriter.cpp View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FormSubmission.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 11 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 16 chunks +20 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoaderStateMachine.cpp View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/HistoryItem.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/HttpEquiv.cpp View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/ImageLoader.cpp View 1 2 3 6 chunks +8 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/loader/LinkLoader.cpp View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/LinkPreloadResourceClients.h View 1 2 3 6 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/loader/MixedContentChecker.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationPolicy.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/loader/PingLoader.cpp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/ProgressTracker.cpp View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/TextTrackLoader.cpp View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/loader/ThreadableLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp View 6 chunks +14 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/loader/appcache/ApplicationCache.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/appcache/ApplicationCacheHost.cpp View 4 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 22 (11 generated)
hiroshige
PTAL.
4 years, 3 months ago (2016-09-09 09:08:53 UTC) #3
yhirano
https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp File third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp (right): https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp#newcode15 third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp:15: DCHECK(type == LinkPrefetch); DCHECK_EQ https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp#newcode16 third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp:16: DCHECK(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone); ...
4 years, 3 months ago (2016-09-12 04:33:14 UTC) #7
hiroshige
+tkent@, could you take a look at the usage of ALLOW_UNUSED_LOCAL()? https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode754 https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp File third_party/WebKit/Source/core/fetch/LinkFetchResource.cpp ...
4 years, 3 months ago (2016-09-13 08:43:21 UTC) #9
tkent
https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode754 third_party/WebKit/Source/core/fetch/Resource.cpp:754: ALLOW_UNUSED_LOCAL(timer); On 2016/09/13 at 08:43:19, hiroshige wrote: > On ...
4 years, 3 months ago (2016-09-13 08:50:53 UTC) #10
tkent
https://codereview.chromium.org/2327643003/diff/100001/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2327643003/diff/100001/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp#newcode179 third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:179: DCHECK(sheet && sheet->isCacheableForResource()); Split it to who DCHECKs. https://codereview.chromium.org/2327643003/diff/100001/third_party/WebKit/Source/core/loader/DocumentWriter.cpp ...
4 years, 3 months ago (2016-09-13 08:52:09 UTC) #11
tkent
https://codereview.chromium.org/2327643003/diff/100001/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/2327643003/diff/100001/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp#newcode179 third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:179: DCHECK(sheet && sheet->isCacheableForResource()); On 2016/09/13 at 08:52:09, tkent wrote: ...
4 years, 3 months ago (2016-09-13 08:53:03 UTC) #12
hiroshige
https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/Resource.cpp File third_party/WebKit/Source/core/fetch/Resource.cpp (right): https://codereview.chromium.org/2327643003/diff/40001/third_party/WebKit/Source/core/fetch/Resource.cpp#newcode754 third_party/WebKit/Source/core/fetch/Resource.cpp:754: ALLOW_UNUSED_LOCAL(timer); On 2016/09/13 08:50:52, tkent wrote: > On 2016/09/13 ...
4 years, 3 months ago (2016-09-13 09:30:51 UTC) #13
yhirano
lgtm
4 years, 3 months ago (2016-09-14 11:50:28 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2327643003/140001
4 years, 3 months ago (2016-09-14 15:55:16 UTC) #18
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 3 months ago (2016-09-14 17:39:20 UTC) #20
commit-bot: I haz the power
4 years, 3 months ago (2016-09-14 17:42:18 UTC) #22
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/b4c242bce2dd77f07a5d2b051088688f1ebbab86
Cr-Commit-Position: refs/heads/master@{#418606}

Powered by Google App Engine
This is Rietveld 408576698