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

Issue 618583002: Correct data size argument type in resource loading path to unsigned (Closed)

Created:
6 years, 2 months ago by tyoshino (SeeGerritForStatus)
Modified:
6 years, 2 months ago
Reviewers:
tkent, kouhei (in TOK)
CC:
blink-reviews, tzik, webcomponents-bugzilla_chromium.org, eae+blinkwatch, fs, eric.carlson_apple.com, apavlov+blink_chromium.org, kinuko+worker_chromium.org, aandrey+blink_chromium.org, falken, caseq+blink_chromium.org, blink-reviews-events_chromium.org, malch+blink_chromium.org, blink-reviews-html_chromium.org, yurys+blink_chromium.org, dglazkov+blink, gavinp+loader_chromium.org, devtools-reviews_chromium.org, nessy, loislo+blink_chromium.org, jamesr, philipj_slow, nhiroki, eustas+blink_chromium.org, paulirish+reviews_chromium.org, lushnikov+blink_chromium.org, Nate Chapin, vcarbune.chromium, gasubic, mkwst+moarreviews_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, horo+watch_chromium.org, sergeyv+blink_chromium.org, kinuko+fileapi
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Correct data size argument type in resource loading path to unsigned int is used for ThreadableLoaderClient::didReceiveData()'s dataLength argument and some of its implementations are calling strlen when dataLength is -1. It never happens. We should give appropriate type to the data path. Chromium side CL: https://codereview.chromium.org/615823002/ R=tkent,kouhei BUG=418885 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183121

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : Addressed #4 and removed assert from XMLHttpRequest.cpp #

Total comments: 2

Patch Set 5 : Rebase #

Patch Set 6 : Add static_cast to RELEASE_ASSERT in AssociatedURLLoader::ClientAdapter::didReceiveData #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -74 lines) Patch
M Source/core/fetch/ImageResource.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/ImageResource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/MemoryCacheTest.cpp View 1 5 chunks +8 lines, -8 lines 0 comments Download
M Source/core/fetch/RawResource.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/fetch/RawResource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/Resource.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/Resource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/ResourceLoader.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ScriptResource.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fetch/ScriptResource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fileapi/FileReaderLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fileapi/FileReaderLoader.cpp View 2 chunks +2 lines, -3 lines 0 comments Download
M Source/core/html/ImageDocument.cpp View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
M Source/core/html/imports/HTMLImportLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/imports/HTMLImportLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/inspector/InspectorResourceAgent.cpp View 1 2 3 4 1 chunk +1 line, -4 lines 0 comments Download
M Source/core/loader/DocumentLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/DocumentThreadableLoader.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/loader/DocumentThreadableLoader.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/loader/TextTrackLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/TextTrackLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/ThreadableLoaderClient.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/ThreadableLoaderClientWrapper.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/WorkerLoaderClientBridge.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/WorkerLoaderClientBridge.cpp View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/loader/WorkerLoaderClientBridgeSyncHelper.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/WorkerLoaderClientBridgeSyncHelper.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/WorkerThreadableLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/WorkerThreadableLoader.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/appcache/ApplicationCacheHost.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/loader/appcache/ApplicationCacheHost.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/EventSource.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/EventSource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/WorkerScriptLoader.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/workers/WorkerScriptLoader.cpp View 2 chunks +1 line, -4 lines 0 comments Download
M Source/core/xml/XMLHttpRequest.h View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/xml/XMLHttpRequest.cpp View 1 2 3 4 chunks +3 lines, -6 lines 0 comments Download
M Source/platform/SharedBuffer.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M Source/platform/SharedBuffer.cpp View 1 1 chunk +1 line, -5 lines 0 comments Download
M Source/web/AssociatedURLLoader.cpp View 1 2 3 4 5 3 chunks +5 lines, -2 lines 0 comments Download
M Source/web/WebSharedWorkerImpl.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M public/platform/WebApplicationCacheHost.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 40 (15 generated)
tyoshino (SeeGerritForStatus)
6 years, 2 months ago (2014-09-30 07:19:16 UTC) #2
kouhei (in TOK)
https://codereview.chromium.org/618583002/diff/40001/Source/core/fetch/ResourceLoader.cpp File Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/618583002/diff/40001/Source/core/fetch/ResourceLoader.cpp#newcode440 Source/core/fetch/ResourceLoader.cpp:440: ASSERT(length >= 0); is ASSERT safe enough? should we ...
6 years, 2 months ago (2014-09-30 07:23:03 UTC) #3
kouhei (in TOK)
https://codereview.chromium.org/618583002/diff/40001/Source/core/html/ImageDocument.cpp File Source/core/html/ImageDocument.cpp (right): https://codereview.chromium.org/618583002/diff/40001/Source/core/html/ImageDocument.cpp#newcode133 Source/core/html/ImageDocument.cpp:133: ASSERT(length <= UINT_MAX); RELEASE_ASSERT(length <= std::numeric_limits<unsigned>::max());
6 years, 2 months ago (2014-09-30 07:41:22 UTC) #4
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/618583002/diff/40001/Source/core/fetch/ResourceLoader.cpp File Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/618583002/diff/40001/Source/core/fetch/ResourceLoader.cpp#newcode440 Source/core/fetch/ResourceLoader.cpp:440: ASSERT(length >= 0); On 2014/09/30 07:23:03, kouhei wrote: > ...
6 years, 2 months ago (2014-09-30 08:14:28 UTC) #5
kouhei (in TOK)
lgtm
6 years, 2 months ago (2014-09-30 09:25:18 UTC) #6
tyoshino (SeeGerritForStatus)
+tkent Kent-san, please take a look at platform/ and web/ dirs.
6 years, 2 months ago (2014-09-30 09:46:36 UTC) #7
tyoshino (SeeGerritForStatus)
+tkent Kent-san, please take a look at platform/ and web/ dirs when you have time. ...
6 years, 2 months ago (2014-09-30 09:47:19 UTC) #9
tkent
Are you sure we don't need uint64_t? https://codereview.chromium.org/618583002/diff/60001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/618583002/diff/60001/Source/core/xml/XMLHttpRequest.cpp#newcode445 Source/core/xml/XMLHttpRequest.cpp:445: void XMLHttpRequest::trackProgress(long ...
6 years, 2 months ago (2014-10-01 03:16:49 UTC) #10
kouhei (in TOK)
On 2014/10/01 03:16:49, tkent (high review load) wrote: > Are you sure we don't need ...
6 years, 2 months ago (2014-10-01 03:28:58 UTC) #11
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/618583002/diff/60001/Source/core/xml/XMLHttpRequest.cpp File Source/core/xml/XMLHttpRequest.cpp (right): https://codereview.chromium.org/618583002/diff/60001/Source/core/xml/XMLHttpRequest.cpp#newcode445 Source/core/xml/XMLHttpRequest.cpp:445: void XMLHttpRequest::trackProgress(long long length) On 2014/10/01 03:16:49, tkent (high ...
6 years, 2 months ago (2014-10-01 03:36:09 UTC) #12
tkent
ok, lgtm
6 years, 2 months ago (2014-10-01 03:37:26 UTC) #13
tyoshino (SeeGerritForStatus)
On 2014/10/01 03:28:58, kouhei wrote: > On 2014/10/01 03:16:49, tkent (high review load) wrote: > ...
6 years, 2 months ago (2014-10-01 03:42:27 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618583002/80001
6 years, 2 months ago (2014-10-02 04:35:29 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/21273)
6 years, 2 months ago (2014-10-02 04:40:38 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618583002/80001
6 years, 2 months ago (2014-10-02 05:12:26 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/25550)
6 years, 2 months ago (2014-10-02 05:18:01 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618583002/80001
6 years, 2 months ago (2014-10-02 05:38:26 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/21284)
6 years, 2 months ago (2014-10-02 05:48:49 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618583002/80001
6 years, 2 months ago (2014-10-02 06:05:34 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/21287)
6 years, 2 months ago (2014-10-02 06:20:59 UTC) #32
tyoshino (SeeGerritForStatus)
Added static_cast to RELEASE_ASSERT in AssociatedURLLoader::ClientAdapter::didReceiveData to fix compilation error on clang
6 years, 2 months ago (2014-10-02 06:27:23 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618583002/100001
6 years, 2 months ago (2014-10-02 06:28:24 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/android_chromium_gn_compile_rel/builds/12418)
6 years, 2 months ago (2014-10-02 06:36:53 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/618583002/100001
6 years, 2 months ago (2014-10-02 06:38:24 UTC) #39
commit-bot: I haz the power
6 years, 2 months ago (2014-10-02 08:07:44 UTC) #40
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as 183121

Powered by Google App Engine
This is Rietveld 408576698