-
Notifications
You must be signed in to change notification settings - Fork 969
Optimize top site order lookups #9582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbondy can you fill in a test plan? or if not needed, we can label as automated-tests
and qa/no-qa-needed
assert.equal(getSiteOrder('calendar.google.com'), 4) | ||
}) | ||
it('orders unknown sites as max int', function () { | ||
assert.equal(getSiteOrder('bradhatesprimes.com'), 9007199254740991) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Number.MAX_SAFE_INTEGER
?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to Clifton's comment on using MAX_SAFE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides nit comment, looks good! 😄 Merging
Optimize top site order lookups
Optimize top site order lookups
Fix #9581
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests