Closed Bug 1231489 Opened 9 years ago Closed 5 years ago

Custom properties of primitive prototypes are not autocompleted

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox66 fixed)

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: simon.lindholm10, Assigned: nchevobbe)

References

Details

(Whiteboard: [boogaloo-mvp])

Attachments

(1 file)

STR:
>> String.prototype.hello = 1
>> a = "hi"
>> a.h<tab>
should auto-complete to "a.hello", but does not. This happens because the browser chrome's String.prototype is used when converting "a" to an object, rather than the page's.

Also happens for numbers, symbols, etc., and for literal strings and arrays (through a separate but similar code path).
Product: Firefox → DevTools
Priority: -- → P2
Whiteboard: [boogaloo-reserve]
Priority: P2 → P3
Whiteboard: [boogaloo-reserve] → [boogaloo-mvp]
Priority: P3 → P2
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: P2 → P1
When provided a string, number or array literals, we use to
simply return the properties from String.prototype, Number.prototype
and Array.prototype.
This is working fine unless the content prototypes are modified.
In order to make it work properly, we retrieve the actual content
prototype.
The js-property-provider unit test is modified to ensure this is
working as expected.
See Also: → 1518241
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c65391dd1e7d
Use content prototype for autocompletion of String, Number and Array literals; r=bgrins.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: