WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
154613
Web Inspector: Setting serializes Infinity as null
https://bugs.webkit.org/show_bug.cgi?id=154613
Summary
Web Inspector: Setting serializes Infinity as null
Matt Baker
Reported
2016-02-23 15:41:59 PST
* SUMMARY Setting serializes Infinity as null. According to the ECMA-262 spec (page 473 Note 4): "Finite numbers are stringified as if by calling ToString(number). NaN and Infinity regardless of sign are represented as the String null." There isn't a need for serializing NaN at the moment. TimelineRuler however, needs to serialize Infinity in order to persist the "nothing is selected" 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.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-02-23 15:42:22 PST
<
rdar://problem/24802960
>
Timothy Hatcher
Comment 2
2016-02-23 15:47:55 PST
We could also store that "entire range selected" state as a bool and restore [0, Infinity] on load from settings.
Matt Baker
Comment 3
2016-02-23 15:50:23 PST
(In reply to
comment #2
)
> We could also store that "entire range selected" state as a bool and restore > [0, Infinity] on load from settings.
That is a possible solution. I'll try this, as well as MAX_VALUE as an alternative to Infinity in TimelineRuler code go with the cleaner solution.
Matt Baker
Comment 4
2016-02-24 17:41:21 PST
Using Number.MAX_VALUE instead of Infinity solved the issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug