Bug 144036
| Summary: | Web Inspector: convert more code to use ES6 method `Object.is()` instead of === | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Brian Burg <burg> |
| Component: | Web Inspector | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | bburg, graouts, inspector-bugzilla-changes, jonowells, ljharb, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Brian Burg
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/20646006>
Timothy Hatcher
I think I still prefer === unless NaN is in the picture. I have a feeling Object.is() would be slower than ===.
Jordan Harband
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?