<?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>154613</bug_id>
          
          <creation_ts>2016-02-23 15:41:59 -0800</creation_ts>
          <short_desc>Web Inspector: Setting serializes Infinity as null</short_desc>
          <delta_ts>2016-02-24 17:41:21 -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>WONTFIX</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>
          
          <blocked>154561</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Baker">mattbaker</reporter>
          <assigned_to name="Matt Baker">mattbaker</assigned_to>
          <cc>bburg</cc>
    
    <cc>graouts</cc>
    
    <cc>joepeck</cc>
    
    <cc>mattbaker</cc>
    
    <cc>nvasilyev</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1167569</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2016-02-23 15:41:59 -0800</bug_when>
    <thetext>* SUMMARY
Setting serializes Infinity as null.

According to the ECMA-262 spec (page 473 Note 4):
&quot;Finite numbers are stringified as if by calling ToString(number). NaN and Infinity regardless of sign are represented as the String null.&quot;

There isn&apos;t a need for serializing NaN at the moment. TimelineRuler however, needs to serialize Infinity in order to persist the &quot;nothing is selected&quot; ruler selection state, which is represented by a selection interval of [0, Infinity).

*NOTES
This can be added by augmenting JSON.stringify in Utilities.js, or by adding a special case in WebInspector.Setting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167570</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2016-02-23 15:42:22 -0800</bug_when>
    <thetext>&lt;rdar://problem/24802960&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167571</commentid>
    <comment_count>2</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2016-02-23 15:47:55 -0800</bug_when>
    <thetext>We could also store that &quot;entire range selected&quot; state as a bool and restore [0, Infinity] on load from settings.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167573</commentid>
    <comment_count>3</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2016-02-23 15:50:23 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; We could also store that &quot;entire range selected&quot; state as a bool and restore
&gt; [0, Infinity] on load from settings.

That is a possible solution. I&apos;ll try this, as well as MAX_VALUE as an alternative to Infinity in TimelineRuler code go with the cleaner solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1167989</commentid>
    <comment_count>4</comment_count>
    <who name="Matt Baker">mattbaker</who>
    <bug_when>2016-02-24 17:41:21 -0800</bug_when>
    <thetext>Using Number.MAX_VALUE instead of Infinity solved the issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>