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

Issue 23498018: [Resource Timing] Fix potential double free problem (Closed)

Created:
7 years, 3 months ago by pan deng
Modified:
7 years, 3 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

[Resource Timing] Fix potential double free problem Currently, ResourceTimingInfoMap in ResourceFetcher releases a ResourceTimingInfo after a resource is reported. If when blink is in reporting a resource entry, which lead to buffer full and immediately invoke "window.stop()" as callback, it will dive into ResourceFetcher::didLoadResource again, and release the memory in a nested. After that,the outer double free the memory as it just report the entry. This patch remove ResourceTiming from map ealier and prevent the double free case. Contributed by lifeasageek@gmail.com and pan.deng@intel.com BUG=286414 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=157760

Patch Set 1 #

Patch Set 2 : Add layout test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -1 line) Patch
A LayoutTests/http/tests/misc/stop-loading-on-resource-timing-buffer-full-crash.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A LayoutTests/http/tests/misc/stop-loading-on-resource-timing-buffer-full-crash-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
inferno
7 years, 3 months ago (2013-09-10 03:31:04 UTC) #1
abarth-chromium
Makes sense to me, but japhet should probably review this CL.
7 years, 3 months ago (2013-09-10 16:16:19 UTC) #2
Nate Chapin
Code change seems reasonable, but I'd like to see the repro from the bug translated ...
7 years, 3 months ago (2013-09-10 19:04:09 UTC) #3
pan deng
On 2013/09/10 19:04:09, Nate Chapin wrote: > Code change seems reasonable, but I'd like to ...
7 years, 3 months ago (2013-09-11 03:04:48 UTC) #4
pan deng
@japhet, any comments? thanks Pan
7 years, 3 months ago (2013-09-13 01:24:25 UTC) #5
Nate Chapin
lgtm
7 years, 3 months ago (2013-09-13 16:19:07 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pan.deng@chromium.org/23498018/5001
7 years, 3 months ago (2013-09-13 16:19:25 UTC) #7
commit-bot: I haz the power
7 years, 3 months ago (2013-09-13 17:04:55 UTC) #8
Message was sent while issue was closed.
Change committed as 157760

Powered by Google App Engine
This is Rietveld 408576698