Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(103)

Issue 802593004: WebAudio: Fix AudioNode leak in a case that AudioNode is not disconnected from the graph explicitly. (Closed)

Created:
4 years, 10 months ago by tkent
Modified:
4 years, 8 months ago
CC:
blink-reviews, oilpan-reviews, kouhei+heap_chromium.org, Mads Ager (chromium)
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

WebAudio: Fix AudioNode leak in a case that AudioNode is not disconnected from the graph explicitly. The main purpose of this CL is to introduce ThreadState::markAsZombie and ThreadState::purifyZombies, and to apply them for WebAudio. Objects marked as zombies are not finalized until purifyZombies is called. This CL also adds MarkingTasks, which enable to run tasks before/ after Oilpan marking. AudioContext implements MarkingTask in order to call purifyZombie before marking, and simplify AudioContext::trace. BUG=434136, 455993 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190366

Patch Set 1 #

Patch Set 2 : New marking mode, simpify WebAudio code #

Total comments: 8

Patch Set 3 : Move removeMarkingTask to uninitialize() #

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -24 lines) Patch
M Source/modules/webaudio/AudioContext.h View 1 2 3 4 4 chunks +14 lines, -1 line 0 comments Download
M Source/modules/webaudio/AudioContext.cpp View 1 2 3 4 7 chunks +37 lines, -8 lines 0 comments Download
M Source/modules/webaudio/AudioNode.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M Source/modules/webaudio/AudioSummingJunction.cpp View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M Source/platform/heap/Heap.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/heap/Heap.cpp View 1 2 3 4 3 chunks +26 lines, -8 lines 0 comments Download
M Source/platform/heap/HeapTest.cpp View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M Source/platform/heap/ThreadState.h View 1 2 3 4 6 chunks +29 lines, -2 lines 3 comments Download
M Source/platform/heap/ThreadState.cpp View 1 2 3 4 4 chunks +58 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (4 generated)
tkent
I need to go out now. I'll add more information to the description later.
4 years, 10 months ago (2014-12-12 05:36:58 UTC) #2
haraken
I understand what this CL is doing, but it seems that the approach has some ...
4 years, 10 months ago (2014-12-12 06:27:41 UTC) #3
tkent
On 2014/12/12 06:27:41, haraken wrote: > I understand what this CL is doing, but it ...
4 years, 10 months ago (2014-12-12 08:02:52 UTC) #4
haraken
I'm getting convinced that something like the zombie you proposed is not avoidable. Here are ...
4 years, 10 months ago (2014-12-15 01:25:13 UTC) #5
tkent
On 2014/12/15 01:25:13, haraken wrote: > - Add visitor->resurrect(object). This API can be used in ...
4 years, 10 months ago (2014-12-16 06:31:37 UTC) #6
haraken
On 2014/12/16 06:31:37, unavailable until Feburuary wrote: > On 2014/12/15 01:25:13, haraken wrote: > > ...
4 years, 10 months ago (2014-12-16 06:43:10 UTC) #7
tkent
On 2014/12/16 06:43:10, haraken wrote: > I'm intending to trace all reachable objects from the ...
4 years, 10 months ago (2014-12-16 06:53:09 UTC) #8
haraken
On 2014/12/16 06:53:09, unavailable until Feburuary wrote: > On 2014/12/16 06:43:10, haraken wrote: > > ...
4 years, 10 months ago (2014-12-16 08:06:41 UTC) #9
tkent
On 2014/12/16 08:06:41, haraken wrote: > 1) A mutator calls object->resurrect() for objects that need ...
4 years, 10 months ago (2014-12-16 08:16:47 UTC) #10
haraken
On 2014/12/16 08:16:47, unavailable until Feburuary wrote: > On 2014/12/16 08:06:41, haraken wrote: > > ...
4 years, 10 months ago (2014-12-16 08:28:36 UTC) #11
tkent
On 2014/12/16 08:28:36, haraken wrote: > On 2014/12/16 08:16:47, unavailable until Feburuary wrote: > > ...
4 years, 8 months ago (2015-02-05 04:13:28 UTC) #12
tkent
I have updated the patch. Please take a look at it. Updates: * Add new ...
4 years, 8 months ago (2015-02-06 04:12:40 UTC) #14
haraken
https://codereview.chromium.org/802593004/diff/40001/Source/modules/webaudio/AudioContext.cpp File Source/modules/webaudio/AudioContext.cpp (right): https://codereview.chromium.org/802593004/diff/40001/Source/modules/webaudio/AudioContext.cpp#newcode169 Source/modules/webaudio/AudioContext.cpp:169: ThreadState::current()->removeMarkingTask(this); Can we move this to AudioContext::uninitialize()? https://codereview.chromium.org/802593004/diff/40001/Source/modules/webaudio/AudioContext.cpp#newcode1165 Source/modules/webaudio/AudioContext.cpp:1165: ...
4 years, 8 months ago (2015-02-06 07:57:24 UTC) #16
tkent
https://codereview.chromium.org/802593004/diff/40001/Source/modules/webaudio/AudioContext.cpp File Source/modules/webaudio/AudioContext.cpp (right): https://codereview.chromium.org/802593004/diff/40001/Source/modules/webaudio/AudioContext.cpp#newcode169 Source/modules/webaudio/AudioContext.cpp:169: ThreadState::current()->removeMarkingTask(this); On 2015/02/06 07:57:23, haraken wrote: > > Can ...
4 years, 8 months ago (2015-02-09 07:00:50 UTC) #17
tkent
rebased. https://codereview.chromium.org/802593004/diff/100001/Source/platform/heap/ThreadState.h File Source/platform/heap/ThreadState.h (right): https://codereview.chromium.org/802593004/diff/100001/Source/platform/heap/ThreadState.h#newcode603 Source/platform/heap/ThreadState.h:603: // Do not use this function. This feature ...
4 years, 8 months ago (2015-02-17 08:24:39 UTC) #18
haraken
LGTM! Thanks for taking a lot of your time on this. We discussed offline and ...
4 years, 8 months ago (2015-02-17 08:37:03 UTC) #19
tkent
https://codereview.chromium.org/802593004/diff/100001/Source/platform/heap/ThreadState.h File Source/platform/heap/ThreadState.h (right): https://codereview.chromium.org/802593004/diff/100001/Source/platform/heap/ThreadState.h#newcode707 Source/platform/heap/ThreadState.h:707: HashSet<void*> m_zombies; On 2015/02/17 08:37:03, haraken wrote: > > ...
4 years, 8 months ago (2015-02-17 23:43:57 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/802593004/100001
4 years, 8 months ago (2015-02-17 23:44:35 UTC) #22
commit-bot: I haz the power
Committed patchset #5 (id:100001) as https://src.chromium.org/viewvc/blink?view=rev&revision=190366
4 years, 8 months ago (2015-02-17 23:48:22 UTC) #23
tkent
4 years, 8 months ago (2015-02-20 00:47:18 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:100001) has been created in
https://codereview.chromium.org/940963005/ by tkent@chromium.org.

The reason for reverting is: Caused multiple problems.  crbug.com/459605
crbug.com/459862 crbug.com/460254.

Powered by Google App Engine
This is Rietveld 408576698