Closed Bug 933984 Opened 8 years ago Closed 8 years ago
._mutation Observer is undefined" from new tab page
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+
OS: Mac OS X → All
Hardware: x86_64 → All
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
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?
Attachment #826246 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.