Summary: | [Mac] Update the time base of event's timestamp when the system time changes | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Benjamin Poulain <benjamin> | ||||
Component: | New Bugs | Assignee: | Benjamin Poulain <benjamin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, bunhere, cdumez, commit-queue, gyuyoung.kim, sergio | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Benjamin Poulain
2014-06-24 23:56:26 PDT
Created attachment 233793 [details]
Patch
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.
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(); }; (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. Comment on attachment 233793 [details] Patch Clearing flags on attachment: 233793 Committed r170434: <http://trac.webkit.org/changeset/170434> All reviewed patches have been landed. Closing bug. |