Autcomplete `this.` shows results for global object
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox-esr102 wontfix, firefox106 wontfix, firefox107 verified, firefox108 verified)
People
(Reporter: wartmanm, Assigned: wartmanm)
Details
Attachments
(1 file)
Steps to reproduce:
const obj = {
a: 1,
b: 2,
sum() {
debugger;
return this.a + this.b;
}
};
While paused in obj.sum(), enter "this.a" in the console.
Actual results:
The autocomplete prompt shows "addEventListener", "alert", etc.
Expected results:
The autocomplete prompt should show the property "a".
This is pretty minor but it also looks like a small fix - passing frameActorId
from autocomplete() through JSPropertyProvider() to evalWithDebugger(). I'd be happy to work on it.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Thanks for reporting and offering help Matthew
Do you want me to assign the bug to you?
Updated•2 years ago
|
Comment 6•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Hi Matthew, I tried to verify this fix in our latest Nightly build 108.0a1 (2022-10-20) by simply opening Console in Dev Tools and pasting the following code:
const obj = {
a: 1,
b: 2,
sum() {
debugger;
return this.a + this.b;
}
};
After hitting Enter and typing "this.a" on the next line we are still getting the addEventListener and Alert autocomplete dropdown list. Are these not the correct steps ?
After entering that snippet you have to run obj.sum()
. Once it pauses in the debugger, typing this.a
should show the expected autocomplete results. Sorry for the unclear directions!
Comment 9•2 years ago
|
||
Thanks for the extra Info Matthew, This issue is verified as fixed in our latest Nightly build as well as our latest Beta 107.0b2, I will updated the flags for Release and ESR since the issue still occurs in those versions.
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Updating the Flags for this issue to Verified.
Description
•