зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1698260
- [devtools] Fix autocomplete for Infinity. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D204478
This commit is contained in:
Родитель
ad2357280f
Коммит
ead1d58895
|
@ -650,7 +650,7 @@ function getMatchedPropsImpl(obj, match, { chainIterator, getProperties }) {
|
|||
// This uses a trick: converting a string to a number yields NaN if
|
||||
// the operation failed, and NaN is not equal to itself.
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (+prop != +prop) {
|
||||
if (+prop != +prop || prop === "Infinity") {
|
||||
matches.add(prop);
|
||||
}
|
||||
|
||||
|
|
|
@ -164,6 +164,7 @@ function runChecks(dbgObject, environment, sandbox) {
|
|||
info("Test that suggestions are given for '(globalThis).'");
|
||||
results = propertyProvider("(globalThis).");
|
||||
test_has_result(results, "testObject");
|
||||
test_has_result(results, "Infinity");
|
||||
|
||||
info(
|
||||
"Test that suggestions are given for deep 'globalThis' properties access"
|
||||
|
@ -705,6 +706,10 @@ function runChecks(dbgObject, environment, sandbox) {
|
|||
results = propertyProvider(`testSelfPrototypeProxy.`);
|
||||
test_has_result(results, `hello`);
|
||||
test_has_result(results, `hasOwnProperty`);
|
||||
|
||||
info("Test suggestion for Infinity");
|
||||
results = propertyProvider("Inf");
|
||||
test_has_result(results, "Infinity");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче