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

Issue 289863005: [Mac] Maximise timer slack for background tabs (Closed)

Created:
6 years, 7 months ago by jeremy
Modified:
6 years, 6 months ago
CC:
chromium-reviews, jam, erikwright+watch_chromium.org, sadrul, darin-cc_chromium.org, tonyg, aiolos (Not reviewing)
Visibility:
Public.

Description

[Mac] Maximise timer slack for background tabs When a tab not playing audio is sent to the background, set timer slack to its maximum value. Support for setting timer slack is added at the MessageLoop level, the concrete implementation of this CL only affects CFMessagePump backed MessageLoops (which means just the main thread for backgrounded renderer processes at present). The MessageLoop implementation is designed to support its use on Windows and Linux (the Windows API sets slack per-timer like the Mac one, while on Linux slack, is set per-thread via a call to prctl() using PR_SET_TIMERSLACK). BUG=356804 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=275218

Patch Set 1 #

Patch Set 2 : Initial review #

Total comments: 10

Patch Set 3 : Work in progress #

Patch Set 4 : Re-implemented on top of Dale's patches #

Patch Set 5 : A few small fixes #

Total comments: 14

Patch Set 6 : Fix review comments #

Patch Set 7 : Fix review comments #

Total comments: 4

Patch Set 8 : Fix review comments #

Patch Set 9 : Rebased against head #

Patch Set 10 : Really rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -12 lines) Patch
M base/base.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M base/message_loop/message_loop.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M base/message_loop/message_pump.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M base/message_loop/message_pump.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M base/message_loop/message_pump_mac.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download
M base/message_loop/message_pump_mac.mm View 1 2 3 4 5 6 7 5 chunks +39 lines, -0 lines 0 comments Download
A base/message_loop/timer_slack.h View 1 2 3 4 5 6 7 1 chunk +22 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -4 lines 0 comments Download
M content/child/child_thread.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -2 lines 0 comments Download
M content/child/child_thread.cc View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -4 lines 0 comments Download
M content/common/child_process_messages.h View 1 2 3 9 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
jeremy
Avi/Kari/Tony: Could you please take a quick look and let me know if you think ...
6 years, 7 months ago (2014-05-20 12:59:15 UTC) #1
tonyg
I'm really excited to see this moving forward! Please treat my comments more as questions ...
6 years, 7 months ago (2014-05-20 14:14:52 UTC) #2
Avi (use Gerrit)
I like the ideas but wonder about the implementation. I have the same question: is ...
6 years, 7 months ago (2014-05-20 14:41:38 UTC) #3
aiolos (Not reviewing)
I'd agree with this not needing to be global as well. It's a good start ...
6 years, 7 months ago (2014-05-20 17:45:22 UTC) #4
jeremy
Thanks!! Summary of changes I plan to make: * Move code to content/. * Make ...
6 years, 7 months ago (2014-05-21 10:23:48 UTC) #5
tonyg
SGTM On May 21, 2014 12:23 PM, "Jeremy Moskovich" <jeremy@chromium.org> wrote: > Thanks!! > > ...
6 years, 7 months ago (2014-05-21 11:14:21 UTC) #6
chromium-reviews
SGTM Cheers, Kari On Wed, May 21, 2014 at 4:14 AM, Tony Gentilcore <tonyg@chromium.org> wrote: ...
6 years, 7 months ago (2014-05-21 15:17:41 UTC) #7
jeremy
This patch is based on top of Dale's in-progress patches: https://codereview.chromium.org/305533006/ https://codereview.chromium.org/298253004/ The main change ...
6 years, 6 months ago (2014-05-29 13:10:00 UTC) #8
tonyg
lgtm Much nicer! The main unittest I'd like to see is that a renderer process ...
6 years, 6 months ago (2014-05-29 14:05:59 UTC) #9
Avi (use Gerrit)
I like this much better. https://codereview.chromium.org/289863005/diff/80001/base/message_loop/message_pump_mac.mm File base/message_loop/message_pump_mac.mm (right): https://codereview.chromium.org/289863005/diff/80001/base/message_loop/message_pump_mac.mm#newcode47 base/message_loop/message_pump_mac.mm:47: static bool function_lookup_error = ...
6 years, 6 months ago (2014-05-29 14:24:15 UTC) #10
DaleCurtis
lgtm. Another area for improvement might be implementing SetProcessBackgrounded() for OSX (whatever that looks like). ...
6 years, 6 months ago (2014-05-29 18:03:08 UTC) #11
tonyg
> The main unittest I'd like to see is that a renderer process with a ...
6 years, 6 months ago (2014-05-29 19:34:13 UTC) #12
jeremy
Mark: Base owner review please :) This should be final except I still need to ...
6 years, 6 months ago (2014-06-02 10:21:27 UTC) #13
Mark Mentovai
https://codereview.chromium.org/289863005/diff/120001/base/message_loop/message_pump_mac.mm File base/message_loop/message_pump_mac.mm (right): https://codereview.chromium.org/289863005/diff/120001/base/message_loop/message_pump_mac.mm#newcode9 base/message_loop/message_pump_mac.mm:9: #include <dlfcn.h> This belongs in the C system header ...
6 years, 6 months ago (2014-06-03 13:15:22 UTC) #14
Avi (use Gerrit)
LGTM with Mark's issues addressed.
6 years, 6 months ago (2014-06-03 14:51:54 UTC) #15
jeremy
Mark: All fixed, thanks! Jschuh: Owner review for content/common/child_process_messages.h please, rubberstamp OK.
6 years, 6 months ago (2014-06-05 12:09:21 UTC) #16
jschuh
ipc security rubberstamp lgtm (notes: bool that was previously windows-only)
6 years, 6 months ago (2014-06-05 13:11:41 UTC) #17
Mark Mentovai
LGTM
6 years, 6 months ago (2014-06-05 13:26:00 UTC) #18
jeremy
The CQ bit was checked by jeremy@chromium.org
6 years, 6 months ago (2014-06-05 14:11:09 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/289863005/160001
6 years, 6 months ago (2014-06-05 14:13:24 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-05 14:32:27 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-05 14:35:09 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/192297) chromium_presubmit on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/chromium_presubmit/builds/71861) ios_rel_device_ninja ...
6 years, 6 months ago (2014-06-05 14:35:09 UTC) #23
jeremy
The CQ bit was checked by jeremy@chromium.org
6 years, 6 months ago (2014-06-05 15:54:02 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/289863005/180001
6 years, 6 months ago (2014-06-05 15:55:02 UTC) #25
commit-bot: I haz the power
6 years, 6 months ago (2014-06-05 19:36:25 UTC) #26
Message was sent while issue was closed.
Change committed as 275218

Powered by Google App Engine
This is Rietveld 408576698