onLocationChange not being fired when you go back in history




10 years ago
10 years ago


(Reporter: Natch, Unassigned)



Firefox Tracking Flags

(Not tracked)




10 years ago
var progressListener = {
  onLocationChange: function(aWebProgress, aLocation, aStatus) {



That code on Mac doesn't call the onLocationChange handler, as it does on all other platforms, see the different logs at:




Ignore all the debugging failures, the test toolbarButtons.js times out after the back-button is clicked because the onLocationChange handler isn't called.

Comment 1

10 years ago
qawanted: I don't have a mac, but I'll try to bundle up an extension for someone to try out on mac, I'm not sure if this is a regression or not, and I'm not 100% sure of the validity of this bug. The only confirmation I have is from tryserver runs with some logging enabled.
Keywords: qawanted

Comment 2

10 years ago
Actually, this should be enough:

var progressListener = {onLocationChange: function(aWebProgress, aRequest, aLocation) { alert("Location changed: " + aWebProgress.currentURI.spec); var cancel = confirm("Stop delivering these notifications?"); if (cancel) top.opener.gBrowser.removeTabsProgressListener(this);}}; top.opener.gBrowser.addTabsProgressListener(progressListener);

copy/paste that into the error console, then navigate to a page, you'll get an alert when the location of any tab in the window you opened the error console from is changed.


1) navigate to a about:robots*, make sure the back button is enabled.
2) open the error console (ctrl-shift-j) and type in the js above.
3) go back to the browser and hit back.
4) ensure you get a notification that the page has changed.

Note: you'll get some errors about certain functions that aren't implemented, you can safely ignore them.

* This can really be any about: page, as long as it gives you history (i.e. the back button is enabled), but I was testing with about: pages so I'd rather get the results of doing that. If you can test regular pages as well and post the result, that'd be great.
Yep, I get an alert when running through the steps to reproduce on OSX with build Id:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20090831 Minefield/3.7a1pre ID:20090831030956
Keywords: qawanted

Comment 4

10 years ago
Thanks so much! Anyhow, that makes this invalid, but leaves me in the dark. I can't imagine the tests in bug 512263 are too long for t-boxes, then again it just might be.

I would truly be indebted to you if you could apply the last patch in bug 512263 and report the results, then all you have to do (assuming you have MozillaBuild) is:

1) cd $OBJDIR/browser/base
2) make (assuming your build is in a working state)
3) TEST_PATH=browser/base/content make -C $OBJDIR mochitest-browser-chrome

If you've got some time, of course, not trying to push anything here :-)
No longer blocks: 512263
Last Resolved: 10 years ago
Keywords: pp
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.