зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1583064 - Enable inline preview for class fields within the debugger. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101733
This commit is contained in:
Родитель
547f195fc5
Коммит
2d9f7dc611
|
@ -8314,7 +8314,7 @@ const sourceOptions = {
|
|||
generated: {
|
||||
sourceType: "unambiguous",
|
||||
tokens: true,
|
||||
plugins: ["objectRestSpread", "optionalChaining", "nullishCoalescingOperator"]
|
||||
plugins: ["classProperties", "objectRestSpread", "optionalChaining", "nullishCoalescingOperator"]
|
||||
},
|
||||
original: {
|
||||
sourceType: "unambiguous",
|
||||
|
|
|
@ -26,6 +26,7 @@ const sourceOptions = {
|
|||
sourceType: "unambiguous",
|
||||
tokens: true,
|
||||
plugins: [
|
||||
"classProperties",
|
||||
"objectRestSpread",
|
||||
"optionalChaining",
|
||||
"nullishCoalescingOperator",
|
||||
|
|
|
@ -37,6 +37,10 @@ add_task(async function() {
|
|||
fields: [["length", "0"]],
|
||||
},
|
||||
]);
|
||||
|
||||
await previews(dbg, "classPreview", [
|
||||
{ line: 45, column: 20, expression: "this.x", result: 1 },
|
||||
]);
|
||||
});
|
||||
|
||||
async function previews(dbg, fnName, previews) {
|
||||
|
|
|
@ -37,3 +37,15 @@ function largeArray() {
|
|||
}
|
||||
debugger;
|
||||
}
|
||||
|
||||
function classPreview() {
|
||||
class Foo {
|
||||
x = 1;
|
||||
breakFn() {
|
||||
let i = this.x;
|
||||
debugger;
|
||||
}
|
||||
}
|
||||
const foo = new Foo();
|
||||
foo.breakFn();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче