"this._mutationObserver is undefined" from new tab page

RESOLVED FIXED in Firefox 27

Status

()

Firefox
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Jesse Ruderman, Assigned: adw)

Tracking

({regression})

Trunk
Firefox 28
regression
Points:
---

Firefox Tracking Flags

(firefox26 unaffected, firefox27 fixed, firefox28 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
JavaScript error: chrome://browser/content/newtab/newTab.js, line 454: this._mutationObserver is undefined

I think this is actually
http://hg.mozilla.org/mozilla-central/annotate/ad2a5a4f53ec/browser/base/content/newtab/page.js#l149
which was added in bug 910036.

Fuzzing hits this frequently, but I don't have a reproducible testcase.
(Assignee)

Comment 1

4 years ago
Created attachment 826246 [details] [diff] [review]
guard against _mutationObserver being undefined

Thanks, Jesse.

(In reply to Jesse Ruderman from comment #0)
> I think this is actually
> http://hg.mozilla.org/mozilla-central/annotate/ad2a5a4f53ec/browser/base/
> content/newtab/page.js#l149

Yes, I'm seeing that, too.  (Is there a bug on JS errors not reporting correct file names and line numbers for preprocessed files?  I would really like to fix that.)

This is easy to reproduce.  Just set browser.newtabpage.enabled to false, restart, open a new tab, and then close it.  The problem is that in _init, _mutationObserver is only defined if newtab is enabled, but on unload, _mutationObserver.disconnect() is unconditionally called.

An alternative to this patch would be to define _mutationObserver in init (no leading underscore), which is called even if newtab is disabled.  But I think this patch is better since _mutationObserver isn't needed if newtab is disabled.
Assignee: nobody → adw
Status: NEW → ASSIGNED
Attachment #826246 - Flags: review?(gavin.sharp)
Attachment #826246 - Flags: review?(gavin.sharp) → review+
(Assignee)

Comment 2

4 years ago
https://hg.mozilla.org/integration/fx-team/rev/0325da4d4bbc
OS: Mac OS X → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/0325da4d4bbc
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
(Assignee)

Comment 4

4 years ago
Comment on attachment 826246 [details] [diff] [review]
guard against _mutationObserver being undefined

This patch applies cleanly to Aurora.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 910036, which is on Aurora
User impact if declined: low (stray JS error)
Testing completed (on m-c, etc.): bug 910036 has automated test
Risk to taking this patch (and alternatives if risky): very very low
String or IDL/UUID changes made by this patch: none
Attachment #826246 - Flags: approval-mozilla-aurora?

Updated

4 years ago
status-firefox26: --- → unaffected
status-firefox27: --- → affected
status-firefox28: --- → fixed

Updated

4 years ago
Attachment #826246 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/e3c81d8f02d3
status-firefox27: affected → fixed

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.