Warning spammed frequently in Browser Console: "aLink should be the same as sortedLinks[idx] RemoteNewTabUtils.jsm:560:0"

NEW
Unassigned

Status

()

Firefox
New Tab Page
2 years ago
2 years ago

People

(Reporter: dholbert, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox45 affected)

Details

(Reporter)

Description

2 years ago
In my normal Firefox browsing session, I'm seeing this warning spammed repeatedly to my error console:
> aLink should be the same as sortedLinks[idx] RemoteNewTabUtils.jsm:560:0

This is with Nightly 45.0a1 (2015-11-09), i.e. yesterday morning's nightly.  I opened Firefox ~15 minutes ago, and I've done very little browsing (though I have a lot of background tabs), and I already see 20 instances of this exact warning in my error console.
(Reporter)

Comment 1

2 years ago
The error is pointing to this "throw" statement:

527   /**
528    * Called by a provider to notify us when a single link changes.
529    * @param aProvider The provider whose link changed.
537   onLinkChanged: function Links_onLinkChanged(aProvider, aLink, aIndex=-1, aDeleted=false) {
[...]
552     if (existingLink) {
553       // Update our copy's position in O(lg n) by first removing it from its
554       // list.  It's important to do this before modifying its properties.
555       if (this._sortProperties.some(prop => prop in aLink)) {
556         let idx = aIndex;
557         if (idx < 0) {
558           idx = this._indexOf(sortedLinks, existingLink);
559         } else if (this.compareLinks(aLink, sortedLinks[idx]) != 0) {
560           throw new Error("aLink should be the same as sortedLinks[idx]");
561         }

https://mxr.mozilla.org/mozilla-central/source/browser/components/newtab/RemoteNewTabUtils.jsm?rev=cc473fe5dc51#560
(Reporter)

Comment 2

2 years ago
Looks like this code was all added in bug 1210940.
Blocks: 1210940
Summary: aLink should be the same as sortedLinks[idx] RemoteNewTabUtils.jsm:560:0 → Warning spammed frequently in Browser Console: "aLink should be the same as sortedLinks[idx] RemoteNewTabUtils.jsm:560:0"
You need to log in before you can comment on or make changes to this bug.