TypeError: styles.includes is not a function in resource:///components/nsBrowserGlue.js line 501, 61

RESOLVED FIXED in Firefox 42

Status

()

defect
P1
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: freddyb, Assigned: adw)

Tracking

42 Branch
Firefox 43
Points:
---
Dependency tree / graph
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(firefox41 unaffected, firefox42 fixed, firefox43 fixed)

Details

(Whiteboard: [fxsearch])

Attachments

(1 attachment)

Reporter

Description

4 years ago
In some cases, the URL bar in Aurora (42.0a2 (2015-09-01) and previously) stops working. I have to restart the browser to make it fully functional again.

This may be unrelated to the bug I am seeing, but I'm filing all errors I can see in the browser console right now


Affected source lines:
>      let styles = controller.getStyleAt(idx).split(/\s+/);
>      let style = ["autofill", "tag", "bookmark"].find(s => styles.includes(s));
>

Suggested patch: Check if styles is indeed an array, and not undefined.
Reporter

Updated

4 years ago
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Version: unspecified → 42 Branch
Assignee

Comment 1

4 years ago
Posted patch patchSplinter Review
Thank you!

Ugh, another case of using array.includes...  We need to uplift this patch to 42 ASAP.

I don't that error should cause the urlbar to stop working though, which is troubling.  The error happens when nsBrowserGlue observes autocomplete-did-enter-text, and the only thing that broadcasts that notification is the cpp here, which discards the NotifyObservers return value: http://hg.mozilla.org/releases/mozilla-aurora/file/91825878e01a/toolkit/components/autocomplete/nsAutoCompleteController.cpp#l1477
Assignee: nobody → adw
Status: NEW → ASSIGNED
Attachment #8656096 - Flags: review?(mak77)
Assignee

Updated

4 years ago
Flags: firefox-backlog+
OS: Linux → All
Priority: -- → P1
Hardware: x86_64 → All
Whiteboard: [fxsearch]
Assignee

Comment 2

4 years ago
(In reply to Drew Willcoxon :adw from comment #1)
> I don't that error should cause the urlbar to stop working though

I don't think that error
Attachment #8656096 - Flags: review?(mak77) → review+
Reporter

Comment 3

4 years ago
(In reply to Drew Willcoxon :adw from comment #2)
> (In reply to Drew Willcoxon :adw from comment #1)
> > I don't that error should cause the urlbar to stop working though
> 
> I don't think that error

Thanks for the quick look! I'll keep filing errors then ;-)
https://hg.mozilla.org/mozilla-central/rev/934ff69fca49
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Assignee

Comment 6

4 years ago
(In reply to Frederik Braun [:freddyb] (on PTO until Sep 4th) from comment #3)
> Thanks for the quick look! I'll keep filing errors then ;-)

Please do!  Thanks again.
Assignee

Comment 7

4 years ago
Comment on attachment 8656096 [details] [diff] [review]
patch

Approval Request Comment
[Feature/regressing bug #]:
Adding telemetry to the urlbar in bug 775825 (landed on 42)

[User impact if declined]:
None hopefully since this is just telemetry, although comment 0 mentions that the urlbar stopped working until a restart possibly because of this bug.  But if we don't take it, we'll have to wait another release to get telemetry data because this bug will prevent it from being collected properly.

[Describe test coverage new/current, TreeHerder]:
No new test for this, but telemetry has existing coverage, and I tested this manually.

[Risks and why]:
Low risk, fairly small and isolated change.

[String/UUID change made/needed]:
None
Attachment #8656096 - Flags: approval-mozilla-aurora?
Comment on attachment 8656096 [details] [diff] [review]
patch

We want better telemetry, taking it.
Attachment #8656096 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.