<?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>194549</bug_id>
          
          <creation_ts>2019-02-12 11:56:53 -0800</creation_ts>
          <short_desc>Web Inspector: Timeline.prototype.recordsInTimeRange uses a property most records do not have</short_desc>
          <delta_ts>2019-02-12 13:23:32 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Joseph Pecoraro">joepeck</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1505318</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-02-12 11:56:53 -0800</bug_when>
    <thetext>Timeline.prototype.recordsInTimeRange uses a property most records do not have

Change `record.timestamp` to `record.startTime`.

  • Not all records have a timestamp. They do have a startTime/endTime
  • Those that do, set the startTime/endTime to the timestamp value</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505320</commentid>
    <comment_count>1</comment_count>
      <attachid>361818</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-02-12 11:57:18 -0800</bug_when>
    <thetext>Created attachment 361818
[PATCH] Proposed Fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505325</commentid>
    <comment_count>2</comment_count>
      <attachid>361818</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2019-02-12 12:04:04 -0800</bug_when>
    <thetext>Comment on attachment 361818
[PATCH] Proposed Fix

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

rs=me

&gt; Source/WebInspectorUI/UserInterface/Models/Timeline.js:99
&gt; +        let upperIndex = this._records.upperBound(endTime, (time, record) =&gt; time - record.startTime);

Should this be `endTime`?  If it&apos;s `startTime`, that means we&apos;d include records that began in the range, but finished outside of the range.  If it&apos;s `endTime`, then we&apos;d exclude those records.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505348</commentid>
    <comment_count>3</comment_count>
      <attachid>361818</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-02-12 12:55:41 -0800</bug_when>
    <thetext>Comment on attachment 361818
[PATCH] Proposed Fix

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

&gt;&gt; Source/WebInspectorUI/UserInterface/Models/Timeline.js:99
&gt;&gt; +        let upperIndex = this._records.upperBound(endTime, (time, record) =&gt; time - record.startTime);
&gt; 
&gt; Should this be `endTime`?  If it&apos;s `startTime`, that means we&apos;d include records that began in the range, but finished outside of the range.  If it&apos;s `endTime`, then we&apos;d exclude those records.

I&apos;d expect records that are even partially in the range. The lowerIndex could use `record.endTime`, but there is `includeRecordBeforeStart`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505364</commentid>
    <comment_count>4</comment_count>
      <attachid>361818</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-02-12 13:22:02 -0800</bug_when>
    <thetext>Comment on attachment 361818
[PATCH] Proposed Fix

Clearing flags on attachment: 361818

Committed r241315: &lt;https://trac.webkit.org/changeset/241315&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505365</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-02-12 13:22:03 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1505367</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-02-12 13:23:32 -0800</bug_when>
    <thetext>&lt;rdar://problem/48012450&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>361818</attachid>
            <date>2019-02-12 11:57:18 -0800</date>
            <delta_ts>2019-02-12 13:22:02 -0800</delta_ts>
            <desc>[PATCH] Proposed Fix</desc>
            <filename>time-range-1.patch</filename>
            <type>text/plain</type>
            <size>1650</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCmluZGV4IDE4YWJiODY5MDMzLi45OTY4NjM0MzAxZCAxMDA2
NDQKLS0tIGEvU291cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTktMDItMTIgIEpvc2Vw
aCBQZWNvcmFybyAgPHBlY29yYXJvQGFwcGxlLmNvbT4KKworICAgICAgICBXZWIgSW5zcGVjdG9y
OiBUaW1lbGluZS5wcm90b3R5cGUucmVjb3Jkc0luVGltZVJhbmdlIHVzZXMgYSBwcm9wZXJ0eSBt
b3N0IHJlY29yZHMgZG8gbm90IG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N0YXJ0VGltZSwgKHRpbWUsIHJlY29yZCkgPT4gdGltZSAt
IHJlY29yZC50aW1lc3RhbXApOwotICAgICAgICBsZXQgdXBwZXJJbmRleCA9IHRoaXMuX3JlY29y
ZHMudXBwZXJCb3VuZChlbmRUaW1lLCAodGltZSwgcmVjb3JkKSA9PiB0aW1lIC0gcmVjb3JkLnRp
bWVzdGFtcCk7CisgICAgICAgIGxldCBsb3dlckluZGV4ID0gdGhpcy5fcmVjb3Jkcy5sb3dlckJv
dW5kKHN0YXJ0VGltZSwgKHRpbWUsIHJlY29yZCkgPT4gdGltZSAtIHJlY29yZC5zdGFydFRpbWUp
OworICAgICAgICBsZXQgdXBwZXJJbmRleCA9IHRoaXMuX3JlY29yZHMudXBwZXJCb3VuZChlbmRU
aW1lLCAodGltZSwgcmVjb3JkKSA9PiB0aW1lIC0gcmVjb3JkLnN0YXJ0VGltZSk7CiAKICAgICAg
ICAgLy8gSW5jbHVkZSB0aGUgcmVjb3JkIHJpZ2h0IGJlZm9yZSB0aGUgc3RhcnQgdGltZS4KICAg
ICAgICAgaWYgKGluY2x1ZGVSZWNvcmRCZWZvcmVTdGFydCAmJiBsb3dlckluZGV4ID4gMCkK
</data>

          </attachment>
      

    </bug>

</bugzilla>