зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1614914 - Fix TypeError in JsPropertyProvider for debugger keyword. r=Honza.
A check is added, as well as a test to ensure everything is okay. Differential Revision: https://phabricator.services.mozilla.com/D62599 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
68097ebd32
Коммит
bed183e1a6
|
@ -131,6 +131,10 @@ function JSPropertyProvider({
|
|||
// Finding the last expression since we've sliced up until the dot.
|
||||
// If there were parse errors this won't exist.
|
||||
if (lastBody) {
|
||||
if (!lastBody.expression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
astExpression = lastBody.expression;
|
||||
let matchingObject;
|
||||
|
||||
|
|
|
@ -658,6 +658,10 @@ function runChecks(dbgObject, environment, sandbox) {
|
|||
|
||||
results = propertyProvider(`true?<t`);
|
||||
test_has_no_results(results);
|
||||
|
||||
// Test autocompletion on debugger statement does not throw
|
||||
results = propertyProvider(`debugger.`);
|
||||
Assert.ok(results === null, "Does not complete a debugger keyword");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче