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

Issue 247253002: Allow ActiveDOMObjects to be destructed while iterating the list of ActiveDOMObjects (Closed)

Created:
6 years, 8 months ago by haraken
Modified:
6 years, 7 months ago
CC:
blink-reviews, sof, eae+blinkwatch, dglazkov+blink, adamk+blink_chromium.org, Inactive, ojan, rwlbuis
Visibility:
Public.

Description

Allow ActiveDOMObjects to be destructed while iterating ContextLifeCycleNotifier::m_activeDOMObjects Currently we are not allowed to destruct ActiveDOMObjects while iterating ContextLifeCycleNotifier::m_activeDOMObjects. This restriction is needed in order not to confuse the iteration. However, the restriction is too strong and became a real issue in https://codereview.chromium.org/218953002/. Specifically, we want to make the following scenario workable: (1) ContextLifeCycleNotifier::notifyStoppingActiveDOMObjects() starts iterating m_activeDOMObjects. (2) stop() is notified on an IDBRequest (which is an ActiveDOMObject). (3) The stop() clears a RefPtr<IDBDatabase> (IDBDatabase is also an ActiveDOMObject). (4) IDBDatabase is destructed. This CL changes ContextLifecycleNotifier so that we can destruct ActiveDOMObjects while iterating ContextLifeCycleNotifier::m_activeDOMObjects. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173760

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -19 lines) Patch
M Source/core/dom/ContextLifecycleNotifier.cpp View 1 2 3 4 2 chunks +35 lines, -19 lines 2 comments Download

Messages

Total messages: 43 (0 generated)
haraken
morrita-san: Would you take a look?
6 years, 8 months ago (2014-04-22 11:06:08 UTC) #1
abarth-chromium
not lgtm The problem here is that the IDB code is doing too much work ...
6 years, 8 months ago (2014-04-22 16:20:06 UTC) #2
haraken
On 2014/04/22 16:20:06, abarth wrote: > not lgtm > > The problem here is that ...
6 years, 8 months ago (2014-04-23 00:56:57 UTC) #3
haraken
6 years, 8 months ago (2014-04-23 00:58:47 UTC) #4
Hajime Morrita
Just a random idea: Probably we could ask the context to remove/delete specific object after ...
6 years, 8 months ago (2014-04-23 01:10:36 UTC) #5
haraken
On 2014/04/23 01:10:36, morrita1 wrote: > Just a random idea: > > Probably we could ...
6 years, 8 months ago (2014-04-23 01:31:17 UTC) #6
abarth-chromium
On 2014/04/23 01:31:17, haraken wrote: > What do you think? Maybe we should create a ...
6 years, 8 months ago (2014-04-23 03:23:37 UTC) #7
haraken
On 2014/04/23 03:23:37, abarth wrote: > On 2014/04/23 01:31:17, haraken wrote: > > What do ...
6 years, 8 months ago (2014-04-23 07:31:51 UTC) #8
abarth-chromium
On 2014/04/23 07:31:51, haraken wrote: > On 2014/04/23 03:23:37, abarth wrote: > > On 2014/04/23 ...
6 years, 8 months ago (2014-04-23 17:54:22 UTC) #9
haraken
Thanks for review, and I'm sorry for iterating much on this CL. On 2014/04/23 17:54:22, ...
6 years, 8 months ago (2014-04-24 01:00:04 UTC) #10
haraken
On 2014/04/24 01:00:04, haraken wrote: > Thanks for review, and I'm sorry for iterating much ...
6 years, 8 months ago (2014-04-24 10:37:50 UTC) #11
abarth-chromium
On 2014/04/24 10:37:50, haraken wrote: > tkent@ invented a better solution to disconnect IDB backends ...
6 years, 8 months ago (2014-04-24 15:01:13 UTC) #12
haraken
(Reopening this CL) abarth@: We hit another issue (https://code.google.com/p/chromium/issues/detail?id=371458) because ActiveDOMObject cannot be destructed while ...
6 years, 7 months ago (2014-05-08 23:34:20 UTC) #13
abarth-chromium
On 2014/05/08 23:34:20, haraken wrote: > So I think (b) is better and we need ...
6 years, 7 months ago (2014-05-09 03:20:06 UTC) #14
abarth-chromium
Do you still like the approach in this CL or do you plan to upload ...
6 years, 7 months ago (2014-05-09 03:20:38 UTC) #15
haraken
On 2014/05/09 03:20:06, abarth wrote: > On 2014/05/08 23:34:20, haraken wrote: > > So I ...
6 years, 7 months ago (2014-05-09 03:35:13 UTC) #16
abarth-chromium
On 2014/05/09 03:35:13, haraken wrote: > On 2014/05/09 03:20:06, abarth wrote: > > On 2014/05/08 ...
6 years, 7 months ago (2014-05-09 04:34:12 UTC) #17
tkent
On 2014/05/09 03:35:13, haraken wrote: > (1) Some ActiveDOMObjects become unreachable. (It doesn't matter whether ...
6 years, 7 months ago (2014-05-09 04:39:36 UTC) #18
abarth-chromium
On 2014/05/09 04:39:36, tkent wrote: > On 2014/05/09 03:35:13, haraken wrote: > > (1) Some ...
6 years, 7 months ago (2014-05-09 04:48:11 UTC) #19
haraken
On 2014/05/09 04:34:12, abarth wrote: > On 2014/05/09 03:35:13, haraken wrote: > > On 2014/05/09 ...
6 years, 7 months ago (2014-05-09 04:50:18 UTC) #20
haraken
On 2014/05/09 04:48:11, abarth wrote: > On 2014/05/09 04:39:36, tkent wrote: > > On 2014/05/09 ...
6 years, 7 months ago (2014-05-09 04:55:11 UTC) #21
tkent
On 2014/05/09 04:50:18, haraken wrote: > Given that the crash is happening only in oilpan ...
6 years, 7 months ago (2014-05-09 04:59:34 UTC) #22
haraken
On 2014/05/09 04:59:34, tkent wrote: > On 2014/05/09 04:50:18, haraken wrote: > > Given that ...
6 years, 7 months ago (2014-05-09 05:04:38 UTC) #23
tkent
On 2014/05/09 05:04:38, haraken wrote: > On 2014/05/09 04:59:34, tkent wrote: > > On 2014/05/09 ...
6 years, 7 months ago (2014-05-09 05:10:41 UTC) #24
haraken
On 2014/05/09 05:10:41, tkent wrote: > On 2014/05/09 05:04:38, haraken wrote: > > On 2014/05/09 ...
6 years, 7 months ago (2014-05-09 05:16:23 UTC) #25
Mads Ager (chromium)
On 2014/05/09 05:16:23, haraken wrote: > On 2014/05/09 05:10:41, tkent wrote: > > On 2014/05/09 ...
6 years, 7 months ago (2014-05-09 06:53:01 UTC) #26
haraken
Thanks Mads for the clarification! Added a FIXME to the CL. > The long term ...
6 years, 7 months ago (2014-05-09 07:26:21 UTC) #27
Mads Ager (chromium)
On 2014/05/09 07:26:21, haraken wrote: > Thanks Mads for the clarification! Added a FIXME to ...
6 years, 7 months ago (2014-05-09 07:53:02 UTC) #28
haraken
abarth@, tkent@: Would you take a look at the patch set 4? The diff from ...
6 years, 7 months ago (2014-05-09 07:56:30 UTC) #29
Mads Ager (chromium)
https://codereview.chromium.org/247253002/diff/60001/Source/core/dom/ContextLifecycleNotifier.cpp File Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/247253002/diff/60001/Source/core/dom/ContextLifecycleNotifier.cpp#newcode73 Source/core/dom/ContextLifecycleNotifier.cpp:73: // during the iteration in a case where resume() ...
6 years, 7 months ago (2014-05-09 08:05:43 UTC) #30
Mads Ager (chromium)
On 2014/05/09 08:05:43, Mads Ager (chromium) wrote: > https://codereview.chromium.org/247253002/diff/60001/Source/core/dom/ContextLifecycleNotifier.cpp > File Source/core/dom/ContextLifecycleNotifier.cpp (right): > > ...
6 years, 7 months ago (2014-05-09 08:07:41 UTC) #31
haraken
https://codereview.chromium.org/247253002/diff/60001/Source/core/dom/ContextLifecycleNotifier.cpp File Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/247253002/diff/60001/Source/core/dom/ContextLifecycleNotifier.cpp#newcode73 Source/core/dom/ContextLifecycleNotifier.cpp:73: // during the iteration in a case where resume() ...
6 years, 7 months ago (2014-05-09 08:12:36 UTC) #32
Mads Ager (chromium)
Thanks, this looks as good as it can get for shipping ActiveDOMObjects incrementally with Oilpan. ...
6 years, 7 months ago (2014-05-09 08:49:23 UTC) #33
tkent
> - If you don't think the approach is OK, I'll revert modules/notifications back Please ...
6 years, 7 months ago (2014-05-09 09:02:52 UTC) #34
haraken
On 2014/05/09 09:02:52, tkent wrote: > > - If you don't think the approach is ...
6 years, 7 months ago (2014-05-09 09:10:11 UTC) #35
tkent
On 2014/05/09 09:10:11, haraken wrote: > hmm, I noticed we'll also need to revert modules/mediasource ...
6 years, 7 months ago (2014-05-09 09:57:12 UTC) #36
abarth-chromium
https://codereview.chromium.org/247253002/diff/80001/Source/core/dom/ContextLifecycleNotifier.cpp File Source/core/dom/ContextLifecycleNotifier.cpp (right): https://codereview.chromium.org/247253002/diff/80001/Source/core/dom/ContextLifecycleNotifier.cpp#newcode115 Source/core/dom/ContextLifecycleNotifier.cpp:115: } I'm worried that ActiveDOMObjects created during this iteration ...
6 years, 7 months ago (2014-05-09 13:54:39 UTC) #37
haraken
tkent-san: > What classes in modules/{mediasource,encryptedmdia} are already olpaned and > ActiveDOMObject? I couldn't find ...
6 years, 7 months ago (2014-05-09 14:05:14 UTC) #38
abarth-chromium
Ok, LGTM Thanks!
6 years, 7 months ago (2014-05-09 15:37:32 UTC) #39
haraken
tkent-san: Let me land this CL at the moment, since I'm not sure if I ...
6 years, 7 months ago (2014-05-09 15:40:48 UTC) #40
haraken
The CQ bit was checked by haraken@chromium.org
6 years, 7 months ago (2014-05-09 15:40:56 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haraken@chromium.org/247253002/80001
6 years, 7 months ago (2014-05-09 15:41:43 UTC) #42
commit-bot: I haz the power
6 years, 7 months ago (2014-05-09 16:56:42 UTC) #43
Message was sent while issue was closed.
Change committed as 173760

Powered by Google App Engine
This is Rietveld 408576698