Closed
Bug 1399696
Opened 7 years ago
Closed 7 years ago
TypeError: header is null | contentSearchUI.js
Categories
(Firefox :: New Tab Page, defect)
Firefox
New Tab Page
Tracking
()
RESOLVED
FIXED
Firefox 57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: tcampbell, Assigned: k88hudson)
References
Details
Attachments
(1 file)
In Nightly 20170913220121, I get TypeErrors when opening debug console on New Tab page. STR: - Remove search from new tab page - Reload / Open a new new tab page - Open debug console Expected: - Clean console Actual: - TypeError: header is null | contentSearchUI.js:611:5 (_updateDefaultEngineHeader)
Comment 1•7 years ago
|
||
I can't seem to reproduce. I can set a breakpoint for when the search box is shown, but it never calls into contentSearchUI for me when I remove the search box. If you turn on "Persist Logs", what do you see when reloading the page when you have search off? Should be one of jar:file:…activity-stream@mozilla.org.xpi!/chrome/content/data/content/activity-stream-prerendered.html jar:file:…activity-stream@mozilla.org.xpi!/chrome/content/data/content/activity-stream.html
Reporter | ||
Comment 2•7 years ago
|
||
I see: activity-stream@mozilla.org.xpi!/chrome/content/data/content/activity-stream-prerendered.html My new tab page has everything disabled. I'm on Win10 64-bit FF. This only started after last nightly update within 24hr.
Comment 3•7 years ago
|
||
Ah, did you disable things through the in-content preferences? It should have toggled browser.newtabpage.activity-stream.prerender to false automatically, but maybe something is broken.
Reporter | ||
Comment 4•7 years ago
|
||
Correct. I'm using in-content prefs to toggle. It happens on Linux as well for me. If I add search, the error goes away, if I remove it comes back. The browser.newtabpage.activity-stream.prerender is false in about:config and still uses prerended page.
Updated•7 years ago
|
Flags: needinfo?(khudson)
Assignee | ||
Comment 5•7 years ago
|
||
Ah, looks like the prerender pref isn't getting properly read at initialization in aboutNewTabService
Flags: needinfo?(khudson)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8908632 -
Flags: review?(edilee)
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8908632 [details] Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value https://reviewboard.mozilla.org/r/180300/#review185458 Maybe just initialize in the constructor just before calling `this.toggleActivityStream();` ? ::: browser/components/newtab/aboutNewTabService.js:139 (Diff revision 1) > if (stateEnabled) { > this._activityStreamEnabled = true; > } else { > this._activityStreamEnabled = false; > } > + this._activityStreamPrerender = Services.prefs.getBoolPref(PREF_ACTIVITY_STREAM_PRERENDER_ENABLED); The constructor does call `toggleActivityStream` but we should already be updating this state when the pref actually changes. Any reason not to just initialize correctly from the constructor?
Attachment #8908632 -
Flags: review?(edilee) → review+
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → khudson
Assignee | ||
Comment 8•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8908632 [details] Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value https://reviewboard.mozilla.org/r/180300/#review185458 > The constructor does call `toggleActivityStream` but we should already be updating this state when the pref actually changes. Any reason not to just initialize correctly from the constructor? The pref can start off being different on browser initialization (i.e. from previous changes to the pref), which will never trigger the observer
Assignee | ||
Comment 9•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8908632 [details] Bug 1399696 - aboutNewTabService should initialize with the correct _activityStreamPrerender value https://reviewboard.mozilla.org/r/180300/#review185458 To be honest I think specifically initializing values in the constructor would make more sense than adding to toggleActivityStream, but I didn't want to do any refactoring considering we're pretty close to the cut-off
Comment 10•7 years ago
|
||
Pushed by khudson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ad95439eef6 aboutNewTabService should initialize with the correct _activityStreamPrerender value r=Mardak
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2ad95439eef6
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Updated•5 years ago
|
Component: Activity Streams: Newtab → New Tab Page
You need to log in
before you can comment on or make changes to this bug.
Description
•