RESOLVED FIXED 134293
[Mac] Update the time base of event's timestamp when the system time changes
https://bugs.webkit.org/show_bug.cgi?id=134293
Summary [Mac] Update the time base of event's timestamp when the system time changes
Benjamin Poulain
Reported 2014-06-24 23:56:26 PDT
[Mac] Update the time base of event's timestamp when the system time changes
Attachments
Patch (2.38 KB, patch)
2014-06-25 00:01 PDT, Benjamin Poulain
no flags
Benjamin Poulain
Comment 1 2014-06-25 00:01:41 PDT
WebKit Commit Bot
Comment 2 2014-06-25 00:03:08 PDT
Attachment 233793 [details] did not pass style-queue: ERROR: Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:332: More than one command on the same line [whitespace/newline] [4] ERROR: Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:332: Missing space before { [whitespace/braces] [5] ERROR: Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:338: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:339: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:340: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 5 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Anders Carlsson
Comment 3 2014-06-25 07:18:22 PDT
Comment on attachment 233793 [details] Patch 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(); };
Benjamin Poulain
Comment 4 2014-06-25 09:40:15 PDT
(In reply to comment #3) > (From update of attachment 233793 [details]) > 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): The reason I did that is to avoid having the block copied twice with 2 separate heap allocation.
Benjamin Poulain
Comment 5 2014-06-25 13:42:45 PDT
Comment on attachment 233793 [details] Patch Clearing flags on attachment: 233793 Committed r170434: <http://trac.webkit.org/changeset/170434>
Benjamin Poulain
Comment 6 2014-06-25 13:42:49 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.