[webkit-reviews] review granted: [Bug 134293] [Mac] Update the time base of event's timestamp when the system time changes : [Attachment 233793] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 25 07:18:01 PDT 2014


Anders Carlsson <andersca at apple.com> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 134293: [Mac] Update the time base of event's timestamp when the system
time changes
https://bugs.webkit.org/show_bug.cgi?id=134293

Attachment 233793: Patch
https://bugs.webkit.org/attachment.cgi?id=233793&action=review

------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=233793&action=review


> Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:332
> +	   void (^updateBlock)(NSNotification *) = Block_copy(^(NSNotification
*){ updateSystemStartupTimeIntervalSince1970(); });

There's no need to copy the block, it will be copied by addObserverForName. I'd
just use a lambda instead of a block too (they're implicitly converted to
blocks, so something like):

auto updateBlock = [](NSNotification *) {
updateSystemStartupTimeIntervalSince1970(); };


More information about the webkit-reviews mailing list