<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>134293</bug_id>
          
          <creation_ts>2014-06-24 23:56:26 -0700</creation_ts>
          <short_desc>[Mac] Update the time base of event&apos;s timestamp when the system time changes</short_desc>
          <delta_ts>2014-06-25 13:42:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Poulain">benjamin</reporter>
          <assigned_to name="Benjamin Poulain">benjamin</assigned_to>
          <cc>andersca</cc>
    
    <cc>bunhere</cc>
    
    <cc>cdumez</cc>
    
    <cc>commit-queue</cc>
    
    <cc>gyuyoung.kim</cc>
    
    <cc>sergio</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1018277</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-06-24 23:56:26 -0700</bug_when>
    <thetext>[Mac] Update the time base of event&apos;s timestamp when the system time changes</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1018278</commentid>
    <comment_count>1</comment_count>
      <attachid>233793</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-06-25 00:01:41 -0700</bug_when>
    <thetext>Created attachment 233793
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1018279</commentid>
    <comment_count>2</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-06-25 00:03:08 -0700</bug_when>
    <thetext>Attachment 233793 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1018322</commentid>
    <comment_count>3</comment_count>
      <attachid>233793</attachid>
    <who name="Anders Carlsson">andersca</who>
    <bug_when>2014-06-25 07:18:22 -0700</bug_when>
    <thetext>Comment on attachment 233793
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=233793&amp;action=review

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

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

auto updateBlock = [](NSNotification *) { updateSystemStartupTimeIntervalSince1970(); };</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1018351</commentid>
    <comment_count>4</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-06-25 09:40:15 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 233793 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=233793&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/platform/mac/PlatformEventFactoryMac.mm:332
&gt; &gt; +        void (^updateBlock)(NSNotification *) = Block_copy(^(NSNotification *){ updateSystemStartupTimeIntervalSince1970(); });
&gt; 
&gt; There&apos;s no need to copy the block, it will be copied by addObserverForName. I&apos;d just use a lambda instead of a block too (they&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1018399</commentid>
    <comment_count>5</comment_count>
      <attachid>233793</attachid>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-06-25 13:42:45 -0700</bug_when>
    <thetext>Comment on attachment 233793
Patch

Clearing flags on attachment: 233793

Committed r170434: &lt;http://trac.webkit.org/changeset/170434&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1018400</commentid>
    <comment_count>6</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2014-06-25 13:42:49 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>233793</attachid>
            <date>2014-06-25 00:01:41 -0700</date>
            <delta_ts>2014-06-25 13:42:45 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-134293-20140625000120.patch</filename>
            <type>text/plain</type>
            <size>2437</size>
            <attacher name="Benjamin Poulain">benjamin</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTcwMDQ0CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggMGVlNTEyZjJlZTI5ZDRk
MGQ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gICAg
ICAgICAgICAgICAgICAgICAgICAgcXVldWU6bmlsCi0gICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzaW5nQmxvY2s6XihO
U05vdGlmaWNhdGlvbiAqKXsgdXBkYXRlU3lzdGVtU3RhcnR1cFRpbWVJbnRlcnZhbFNpbmNlMTk3
MCgpOyB9XTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgdXNpbmdCbG9jazp1cGRhdGVCbG9ja107CisgICAgICAgIFtb
TlNOb3RpZmljYXRpb25DZW50ZXIgZGVmYXVsdENlbnRlcl0gYWRkT2JzZXJ2ZXJGb3JOYW1lOk5T
U3lzdGVtQ2xvY2tEaWRDaGFuZ2VOb3RpZmljYXRpb24KKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmplY3Q6bmlsCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXVlOm5p
bAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
dXNpbmdCbG9jazp1cGRhdGVCbG9ja107CisgICAgICAgIEJsb2NrX3JlbGVhc2UodXBkYXRlQmxv
Y2spOworCiAgICAgICAgIHVwZGF0ZVN5c3RlbVN0YXJ0dXBUaW1lSW50ZXJ2YWxTaW5jZTE5NzAo
KTsKICAgICB9KTsKICAgICByZXR1cm4gc3lzdGVtU3RhcnR1cFRpbWU7Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>