Bug 144036 - Web Inspector: convert more code to use ES6 method `Object.is()` instead of ===
Summary: Web Inspector: convert more code to use ES6 method `Object.is()` instead of ===
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-04-21 20:31 PDT by Brian Burg
Modified: 2017-02-10 18:03 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2015-04-21 20:31:54 PDT
Implemented in https://bugs.webkit.org/show_bug.cgi?id=143865.

It is basically the same thing as ===, except Object.is(NaN, NaN) returns true.
Comment 1 Radar WebKit Bug Importer 2015-04-21 20:32:21 PDT
<rdar://problem/20646006>
Comment 2 Timothy Hatcher 2015-04-22 07:41:45 PDT
I think I still prefer === unless NaN is in the picture. I have a feeling Object.is() would be slower than ===.
Comment 3 Jordan Harband 2015-04-22 12:09:43 PDT
That's great incentive to make Object.is just as optimized :-) The JIT should be able to inline `Object.is(a, b)` with `a === b || (a !== a && b !== b)` at some point, I'd guess?