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

Issue 8667002: Split a portion of BufferedResourceLoader into a separate class ActiveLoader. (Closed)

Created:
9 years, 1 month ago by scherkus (not reviewing)
Modified:
9 years ago
CC:
chromium-reviews, hclam+watch_chromium.org, Alexander Potapenko, ddorwin+watch_chromium.org, fischman+watch_chromium.org, acolwell+watch_chromium.org, Paweł Hajdan Jr., Timur Iskhodzhanov, annacc+watch_chromium.org, pam+watch_chromium.org, darin-cc_chromium.org, vrk (LEFT CHROMIUM), stuartmorgan+watch_chromium.org, scherkus (not reviewing), ihf+watch_chromium.org
Visibility:
Public.

Description

Split a portion of BufferedResourceLoader into a separate class ActiveLoader. ActiveLoader encapsulates an active WebURLLoader and takes care of maintaining deferred status, references to parent object, and automatic cancelation during teardown. As a result of fixing the imbalanced reference counts to BufferedResourceLoader there were a few use-after-free bugs due to doing work after executing callbacks. The ordering has been updated to ensure that no more work is done after executing callbacks. BUG=100914 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112747

Patch Set 1 #

Total comments: 8

Patch Set 2 : ntis #

Total comments: 4

Patch Set 3 : fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -167 lines) Patch
M tools/heapcheck/suppressions.txt View 1 2 1 chunk +0 lines, -24 lines 0 comments Download
M tools/valgrind/memcheck/suppressions.txt View 1 2 1 chunk +0 lines, -12 lines 0 comments Download
A webkit/media/active_loader.h View 1 2 1 chunk +53 lines, -0 lines 0 comments Download
A webkit/media/active_loader.cc View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
M webkit/media/buffered_data_source_unittest.cc View 1 2 6 chunks +15 lines, -12 lines 0 comments Download
M webkit/media/buffered_resource_loader.h View 1 8 chunks +18 lines, -17 lines 0 comments Download
M webkit/media/buffered_resource_loader.cc View 1 2 22 chunks +56 lines, -77 lines 0 comments Download
M webkit/media/buffered_resource_loader_unittest.cc View 1 2 11 chunks +7 lines, -25 lines 0 comments Download
M webkit/media/webkit_media.gypi View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
scherkus (not reviewing)
This was a smallish enough chunk I could split off from my forest of git ...
9 years, 1 month ago (2011-11-23 00:56:31 UTC) #1
scherkus (not reviewing)
ALSO: I'm not married to the name or the approach that much -- I started ...
9 years, 1 month ago (2011-11-23 01:01:33 UTC) #2
Ami GONE FROM CHROMIUM
http://codereview.chromium.org/8667002/diff/1/tools/valgrind/memcheck/suppressions.txt File tools/valgrind/memcheck/suppressions.txt (left): http://codereview.chromium.org/8667002/diff/1/tools/valgrind/memcheck/suppressions.txt#oldcode4697 tools/valgrind/memcheck/suppressions.txt:4697: bug_100914a Rebase? (but also, Yay!) http://codereview.chromium.org/8667002/diff/1/webkit/media/active_loader.h File webkit/media/active_loader.h (right): ...
9 years ago (2011-11-29 18:55:49 UTC) #3
Ami GONE FROM CHROMIUM
On 2011/11/23 01:01:33, scherkus wrote: > ALSO: I'm not married to the name or the ...
9 years ago (2011-11-29 18:56:21 UTC) #4
scherkus (not reviewing)
I don't think moving AL into BRL will help much. In fact I have bigger ...
9 years ago (2011-11-29 21:43:50 UTC) #5
Ami GONE FROM CHROMIUM
lgtm
9 years ago (2011-11-29 21:47:12 UTC) #6
vrk (LEFT CHROMIUM)
LGTM http://codereview.chromium.org/8667002/diff/7001/webkit/media/buffered_resource_loader.cc File webkit/media/buffered_resource_loader.cc (right): http://codereview.chromium.org/8667002/diff/7001/webkit/media/buffered_resource_loader.cc#newcode479 webkit/media/buffered_resource_loader.cc:479: DoneStart(net::OK); When would there be a start_callback_ at ...
9 years ago (2011-12-01 00:22:27 UTC) #7
scherkus (not reviewing)
9 years ago (2011-12-02 18:24:24 UTC) #8
http://codereview.chromium.org/8667002/diff/7001/webkit/media/buffered_resour...
File webkit/media/buffered_resource_loader.cc (right):

http://codereview.chromium.org/8667002/diff/7001/webkit/media/buffered_resour...
webkit/media/buffered_resource_loader.cc:479: DoneStart(net::OK);
On 2011/12/01 00:22:28, Victoria Kirst wrote:
> When would there be a start_callback_ at this point? Can didFinishLoading get
> called before didReceiveResponse?
> 
> Also was wondering if this is the same scenario as below, where you can have a
> start callback or a read callback but never both.

I *think* so -- I'll add in a DCHECK for  now

http://codereview.chromium.org/8667002/diff/7001/webkit/media/buffered_resour...
webkit/media/buffered_resource_loader.cc:514: return;
On 2011/12/01 00:22:28, Victoria Kirst wrote:
> As mentioned offline: DCHECK that you don't have both a start callback and a
> read callback.

Done.

Powered by Google App Engine
This is Rietveld 408576698