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

Issue 14297022: Resume WebKit shared timers only in previously suspended processes. (Closed)

Created:
7 years, 7 months ago by Philippe
Modified:
7 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, klobag.chromium, pasko-google - do not use
Visibility:
Public.

Description

Resume WebKit shared timers only in previously suspended processes. WebKitPlatformSupportImpl (living in the renderer process) maintains a counter of calls to ResumeSharedTimer() and SuspendSharedTimer(). ResumeSharedTimer() naturally completes only if SuspendSharedTimer() was called previously. This implies that the IPC triggering ResumeSharedTimer() must be sent only to the renderer processes that were previously suspended as opposed to all the current renderer processes. BUG=b/8639231,b/8656786,225243 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=196825

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : Address Jonathan's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -9 lines) Patch
M content/browser/android/content_view_statics.cc View 1 2 2 chunks +49 lines, -9 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Philippe
7 years, 7 months ago (2013-04-26 17:51:16 UTC) #1
joth
small suggestions... but lgtm https://codereview.chromium.org/14297022/diff/1/content/browser/android/content_view_statics.cc File content/browser/android/content_view_statics.cc (right): https://codereview.chromium.org/14297022/diff/1/content/browser/android/content_view_statics.cc#newcode26 content/browser/android/content_view_statics.cc:26: // ContentViewStatistics. and perhaps add ...
7 years, 7 months ago (2013-04-26 17:57:10 UTC) #2
Philippe
Thanks Jonathan! https://chromiumcodereview.appspot.com/14297022/diff/1/content/browser/android/content_view_statics.cc File content/browser/android/content_view_statics.cc (right): https://chromiumcodereview.appspot.com/14297022/diff/1/content/browser/android/content_view_statics.cc#newcode26 content/browser/android/content_view_statics.cc:26: // ContentViewStatistics. On 2013/04/26 17:57:10, joth wrote: ...
7 years, 7 months ago (2013-04-26 18:03:07 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/14297022/8001
7 years, 7 months ago (2013-04-26 18:05:13 UTC) #4
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 7 months ago (2013-04-26 18:07:07 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pliard@chromium.org/14297022/8001
7 years, 7 months ago (2013-04-26 18:10:53 UTC) #6
Kristian Monsen
On 2013/04/26 18:10:53, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
7 years, 7 months ago (2013-04-26 18:27:08 UTC) #7
benm (inactive)
Sent from my Android On 26 Apr 2013 19:27, <kristianm@chromium.org> wrote: > > On 2013/04/26 ...
7 years, 7 months ago (2013-04-26 18:40:14 UTC) #8
Philippe
On 2013/04/26 18:27:08, Kristian Monsen wrote: > On 2013/04/26 18:10:53, I haz the power (commit-bot) ...
7 years, 7 months ago (2013-04-26 18:41:20 UTC) #9
Philippe
Committed patchset #3 manually as r196825 (presubmit successful).
7 years, 7 months ago (2013-04-26 20:58:32 UTC) #10
bulach
lgtm (but I'm not at all familiar here..) if I'm understanding you all correctly, then ...
7 years, 7 months ago (2013-04-29 13:26:15 UTC) #11
Philippe
On 2013/04/29 13:26:15, bulach wrote: > lgtm (but I'm not at all familiar here..) > ...
7 years, 7 months ago (2013-04-29 13:35:03 UTC) #12
joth
7 years, 7 months ago (2013-04-29 16:29:20 UTC) #13
yeah I was wondering about set<> too, but then realized if anything did
result in an erroneous double suspend then vector<> has the benefit of
ensuring we'd send a double resume too (meaning the ref-counting will all
balance out). (and, vector is what it used prior to the bug being
introduced)
But yeah... this is ripe for some cleanup to make it a bit more
understandable!



On 29 April 2013 06:35, <pliard@chromium.org> wrote:

> On 2013/04/29 13:26:15, bulach wrote:
>
>> lgtm (but I'm not at all familiar here..)
>>
>
>  if I'm understanding you all correctly, then perhaps instead of a "vector"
>>
> this
>
>> should be a "set" in order to cope with unbalanced suspend + resume calls?
>>
>
>  on suspend, if the process is not in the set, append there and suspend.
>> on resume, traverse it all and then clear...
>>
>
>  again, I have no idea if this is actually possible, or if it's better to
>> do a
>> deeper cleanup as suggested above...
>>
>
> Thanks Marcus.
>
> I will indeed do a deeper cleanup. Note that the vector here should be
> "safe" (I
> believe) since it is empty on suspend and two processes cannot have the
> same PID
> at the same time. So I believe there is no risk of suspending the same
> process
> twice. There might be another risk though (which will be addressed by the
> deeper
> cleanup): if a suspended renderer process gets killed (e.g. while Chrome
> is in
> background) and if a new renderer  process gets created after that on
> resume
> with the same PID (which would be unfortunate :) then we would end up
> calling
> Resume() on this newly created renderer process which would cause exactly
> the
> same bug.
>
>
https://codereview.chromium.**org/14297022/<https://codereview.chromium.org/1...
>

Powered by Google App Engine
This is Rietveld 408576698