Closed Bug 1583457 Opened 5 years ago Closed 5 years ago

ConsoleProgressListener is never used/tested with MONITOR_LOCATION_CHANGE

Categories

(DevTools :: Console, task, P3)

task

Tracking

(firefox71 fixed)

RESOLVED FIXED
Firefox 71
Tracking Status
firefox71 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

While reviewing mentions of window.top in scope of Bug 1583444, I spotted the following comment:

  /**
   * Check if the current window.top location is changing, given the arguments
   * of nsIWebProgressListener.onStateChange. If that is the case, the remote
   * Web Console instance is notified.
   * @private
   */
  _checkLocationChange: function(progress, request, state) {
[...]
}

https://searchfox.org/mozilla-central/source/devtools/server/actors/webconsole/listeners/console-progress.js#183-209

But the method itself is not using window.top at any point.

This was introduced a very long time ago: https://bugzilla.mozilla.org/show_bug.cgi?id=673148

It is only used if you call ConsoleProgressListener::startMonitor(2) (2 is the value of ConsoleProgressListener.MONITOR_LOCATION_CHANGE), but:

I think we should remove this unused codepath

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2769fdb65549
Remove unused MONITOR_LOCATION_CHANGE option from ConsoleProgress r=nchevobbe
Blocks: 1584087
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: