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

Issue 6831009: Remove code rendered pointless by r65322 (Closed)

Created:
9 years, 8 months ago by Mark Mentovai
Modified:
9 years, 7 months ago
Reviewers:
Avi (use Gerrit), Nico
CC:
chromium-reviews, pam+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Remove code rendered pointless by r65322. Since r65322 MessagePump::ScheduleDelayedWork, which is the underlying implementation for PostDelayedTask, operates on TimeTicks instead of Time units. The TimeTicks timebase is stopped during system sleep. Consequently, since that revision, any work that is scheduled through this interface is now expected to be dispatched after a period of TimeTicks, meaning that it will be further delayed by system sleep. MessagePumpCFRunLoopBase::PowerStateNotification had been used to force an attempt to process queued delayed work upon system wakeup. This had the result of dispatching any work whose expected fire time had occurred while the system was asleep, if any, and of resetting the CFRunLoopTimer properly following a change in the offset between the two timebases. Since r65322, there is only a single timebase and no offset, so PowerStateNotification's dispatch attempt was pointless and would never result in delayed work being dispatched or the CFRunLoopTimer being reset to fire at a time other than what it had already been to fire at. IORegisterForSystemPower may be blocked by the sandbox in some processes on some OS releases, and its use in such circumstances might result in messages about its failure being logged. Since this code no longer has any effect, it can be dropped without perceptible impact, and these alleged log messages will allegedly disappear. BUG=74055 TEST=FutureCat Console.app Also run the tests from http://codereview.chromium.org/342011. The behavior post-r65322 may have changed from the expectations listed in that change, but the behavior should not change at all between the post-r65322 code and this change. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81597

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -104 lines) Patch
M base/message_pump_mac.h View 4 chunks +1 line, -13 lines 0 comments Download
M base/message_pump_mac.mm View 1 4 chunks +1 line, -91 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mark Mentovai
9 years, 8 months ago (2011-04-14 02:44:57 UTC) #1
Mark Mentovai
thakis said he wanted to co-OWN Mac base stuff, so +him too.
9 years, 8 months ago (2011-04-14 02:48:25 UTC) #2
Avi (use Gerrit)
You have an alleged LGTM.
9 years, 8 months ago (2011-04-14 03:29:42 UTC) #3
Nico
9 years, 8 months ago (2011-04-14 18:07:02 UTC) #4
I've read this CL and the one it referenced, and the change makes sense to me.

Powered by Google App Engine
This is Rietveld 408576698