Closed Bug 1201017 Opened 9 years ago Closed 9 years ago

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

Categories

(Firefox :: General, defect, P1)

42 Branch
defect

Tracking

()

RESOLVED FIXED
Firefox 43
Tracking Status
firefox41 --- unaffected
firefox42 --- fixed
firefox43 --- fixed

People

(Reporter: freddy, Assigned: adw)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

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.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Version: unspecified → 42 Branch
Attached 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)
Flags: firefox-backlog+
OS: Linux → All
Priority: -- → P1
Hardware: x86_64 → All
Whiteboard: [fxsearch]
(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+
(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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
(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.
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.

Attachment

General

Created:
Updated:
Size: