Unverified Commit be7f8fc4 authored by Ruben Bridgewater's avatar Ruben Bridgewater Committed by Michaël Zasso
Browse files

assert: fix loose set and map comparison

The fast path did not anticipate different ways to express a loose
equal string value (e.g., 1n == '+0001'). This is now fixed with the
downside that all primitives that could theoretically have equal
entries must go through a full comparison.

Only some strings, symbols, undefined, null and NaN can be detected
in a fast path as those entries have a strictly limited set of
possible equal entries.

PR-URL: https://github.com/nodejs/node/pull/22495


Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarJohn-David Dalton <john.david.dalton@gmail.com>
parent b934add0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment