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

Issue 594083002: Make StorageArea cleanly observe its cached frame (Closed)

Created:
6 years, 3 months ago by sof
Modified:
6 years, 3 months ago
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Make StorageArea cleanly observe its cached frame StorageArea caches the result of its last access check wrt to a LocalFrame. With Oilpan, we have to weakly hold on to that frame so as not to have scripts be able to retain an entire frame. Also, the cached frame might be destroyed before the StorageArea holding a reference is; the implementation is better off clearing that reference when this happens (with or without Oilpan.) Address both by making StorageArea a FrameDestructionObserver that observes its cached frame. It is a weak reference and it will be cleared upon frame destruction. To accommodate StorageArea switching the frame it is observing, make FrameDestructionObserver::observeFrame() again a protected method. R=haraken,ager,zerny BUG=340522 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=182501

Patch Set 1 #

Patch Set 2 : Make StorageArea a FrameDestructionObserver instead #

Patch Set 3 : Make FrameDestructionObserver::observeFrame() protected again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -17 lines) Patch
M Source/core/frame/FrameDestructionObserver.h View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M Source/core/frame/FrameDestructionObserver.cpp View 1 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/frame/LocalFrame.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/frame/LocalFrame.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/storage/StorageArea.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/storage/StorageArea.cpp View 1 3 chunks +10 lines, -5 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
sof
Please take a look. Addresses the Oilpan leaks reported after r182337, afaict.
6 years, 3 months ago (2014-09-23 10:03:33 UTC) #2
haraken
Who clears out the m_canAccessStorageCachedFrame when the frame is gone? Or is it guaranteed that ...
6 years, 3 months ago (2014-09-23 10:06:44 UTC) #3
zerny-chromium
lgtm
6 years, 3 months ago (2014-09-23 10:26:17 UTC) #5
sof
On 2014/09/23 10:06:44, haraken wrote: > Who clears out the m_canAccessStorageCachedFrame when the frame is ...
6 years, 3 months ago (2014-09-23 10:41:24 UTC) #6
Mads Ager (chromium)
lgtm2
6 years, 3 months ago (2014-09-23 10:48:34 UTC) #8
haraken
On 2014/09/23 10:41:24, sof wrote: > On 2014/09/23 10:06:44, haraken wrote: > > Who clears ...
6 years, 3 months ago (2014-09-23 10:54:45 UTC) #9
sof
On 2014/09/23 10:54:45, haraken wrote: > On 2014/09/23 10:41:24, sof wrote: > > On 2014/09/23 ...
6 years, 3 months ago (2014-09-23 10:59:51 UTC) #10
sof
On 2014/09/23 10:59:51, sof wrote: > On 2014/09/23 10:54:45, haraken wrote: > > On 2014/09/23 ...
6 years, 3 months ago (2014-09-23 12:34:36 UTC) #11
haraken
On 2014/09/23 12:34:36, sof wrote: > On 2014/09/23 10:59:51, sof wrote: > > On 2014/09/23 ...
6 years, 3 months ago (2014-09-23 12:38:24 UTC) #12
Mads Ager (chromium)
LGTM Nice catch Haraken. It is good to treat this the same in both builds. ...
6 years, 3 months ago (2014-09-23 12:39:26 UTC) #13
zerny-chromium
lgtm2
6 years, 3 months ago (2014-09-23 12:44:54 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/594083002/40001
6 years, 3 months ago (2014-09-23 12:53:14 UTC) #16
commit-bot: I haz the power
6 years, 3 months ago (2014-09-23 14:52:14 UTC) #17
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as 182501

Powered by Google App Engine
This is Rietveld 408576698