Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Firefox 3.x nsIWebProgressListener OnStateChange bug?

39 views
Skip to first unread message

Jens

unread,
Nov 23, 2009, 6:14:05 PM11/23/09
to
I found another odd thing in regards to Firefox 3.x and the Web
Progress Listener. All the sudden I stop getting “OnStateChange”
events when using the back and forth button. I register a web progress
listener with the following flag ‘NOTIFY_STATE_DOCUMENT’(among others)

These are the steps to reproduce

1. Launch Firefox 3.x
2. Go to www.google.com and perform a search
3. ‘Reload / Refresh’ the search results page
4. Now use the ‘Back’ and ‘Forth’ button, - no ‘OnStateChange’ events
are being generated. (No DOMContentLoaded events are being generated
as well for that matter)

Is this a bug? Shouldn’t we be getting ‘OnStateChange’ when navigating
back and forth between pages?

I believe this worked in Firefox 2.x


Boris Zbarsky

unread,
Nov 23, 2009, 10:20:03 PM11/23/09
to
> 1. Launch Firefox 3.x
> 2. Go to www.google.com and perform a search
> 3. �Reload / Refresh� the search results page
> 4. Now use the �Back� and �Forth� button, - no �OnStateChange� events

> are being generated. (No DOMContentLoaded events are being generated
> as well for that matter)
>
> Is this a bug? Shouldn�t we be getting �OnStateChange� when navigating

> back and forth between pages?

Unclear. I thought bfcache loads sent the state changes, but maybe they
don't. Are you getting pageshow/pagehide events?

-Boris

Jens

unread,
Nov 23, 2009, 11:35:42 PM11/23/09
to
On Nov 23, 7:20 pm, Boris Zbarsky <bzbar...@mit.edu> wrote:
> > 1. Launch Firefox 3.x
> > 2. Go towww.google.comand perform a search

> > 3. ‘Reload / Refresh’ the search results page
> > 4. Now use the ‘Back’ and ‘Forth’ button, - no ‘OnStateChange’ events

> > are being generated. (No DOMContentLoaded events are being generated
> > as well for that matter)
>
> > Is this a bug? Shouldn’t we be getting ‘OnStateChange’ when navigating

> > back and forth between pages?
>
> Unclear.  I thought bfcache loads sent the state changes, but maybe they
> don't.  Are you getting pageshow/pagehide events?
>
> -Boris

It would be great of bfcache load would send the changes as well.
Anyways, let me check the page show/hide events..
-Jens

Boris Zbarsky

unread,
Nov 24, 2009, 1:12:56 AM11/24/09
to
On 11/23/09 11:35 PM, Jens wrote:
> It would be great of bfcache load would send the changes as well.

It sure tries to, as I recalled. See the code and comments in
nsDocShell::BeginRestore

-Boris

John J. Barton

unread,
Nov 24, 2009, 1:46:45 AM11/24/09
to
Jens wrote:
> I found another odd thing in regards to Firefox 3.x and the Web
> Progress Listener. All the sudden I stop getting �OnStateChange�

> events when using the back and forth button. I register a web progress
> listener with the following flag �NOTIFY_STATE_DOCUMENT�(among others)

>
> These are the steps to reproduce
>
> 1. Launch Firefox 3.x
> 2. Go to www.google.com and perform a search
> 3. �Reload / Refresh� the search results page
> 4. Now use the �Back� and �Forth� button, - no �OnStateChange� events

> are being generated. (No DOMContentLoaded events are being generated
> as well for that matter)
>
> Is this a bug? Shouldn�t we be getting �OnStateChange� when navigating

> back and forth between pages?

Perhaps a bug in your code? Try Firebug 1.5Xb4, Open Firebug Icon Menu
"Open Firebug Tracing". Set option WINDOWS. When you get to step 4,
clear the tracing console, then step 4. Lots of onStateChange events and
DOMContentLoaded.

jjb


Jens

unread,
Nov 25, 2009, 2:40:08 PM11/25/09
to
On Nov 23, 10:46 pm, "John J. Barton" <johnjbar...@johnjbarton.com>
wrote:

> Jens wrote:
> > I found another odd thing in regards to Firefox 3.x and the Web
> > Progress Listener. All the sudden I stop getting “OnStateChange”

> > events when using the back and forth button. I register a web progress
> > listener with the following flag ‘NOTIFY_STATE_DOCUMENT’(among others)

>
> > These are the steps to reproduce
>
> > 1. Launch Firefox 3.x
> > 2. Go towww.google.comand perform a search

> > 3. ‘Reload / Refresh’ the search results page
> > 4. Now use the ‘Back’ and ‘Forth’ button, - no ‘OnStateChange’ events

> > are being generated. (No DOMContentLoaded events are being generated
> > as well for that matter)
>
> > Is this a bug? Shouldn’t we be getting ‘OnStateChange’ when navigating

> > back and forth between pages?
>
> Perhaps a bug in your code? Try Firebug 1.5Xb4, Open Firebug Icon Menu
> "Open Firebug Tracing". Set option WINDOWS. When you get to step 4,
> clear the tracing console, then step 4. Lots of onStateChange events and
> DOMContentLoaded.
>
> jjb- Hide quoted text -
>
> - Show quoted text -

I'll give it a try, thanks..

Jens

unread,
Dec 1, 2009, 7:35:35 PM12/1/09
to
On Nov 25, 11:40 am, Jens <jenslsoren...@gmail.com> wrote:
> On Nov 23, 10:46 pm, "John J. Barton" <johnjbar...@johnjbarton.com>
> wrote:
>
>
>
>
>
> > Jens wrote:
> > > I found another odd thing in regards to Firefox 3.x and the Web
> > > Progress Listener. All the sudden I stop getting “OnStateChange”
> > > events when using the back and forth button. I register a web progress
> > > listener with the following flag ‘NOTIFY_STATE_DOCUMENT’(among others)
>
> > > These are the steps to reproduce
>
> > > 1. Launch Firefox 3.x
> > > 2. Go towww.google.comandperform a search

> > > 3. ‘Reload / Refresh’ the search results page
> > > 4. Now use the ‘Back’ and ‘Forth’ button, - no ‘OnStateChange’ events
> > > are being generated. (No DOMContentLoaded events are being generated
> > > as well for that matter)
>
> > > Is this a bug? Shouldn’t we be getting ‘OnStateChange’ when navigating
> > > back and forth between pages?
>
> > Perhaps a bug in your code? Try Firebug 1.5Xb4, Open Firebug Icon Menu
> > "Open Firebug Tracing". Set option WINDOWS. When you get to step 4,
> > clear the tracing console, then step 4. Lots of onStateChange events and
> > DOMContentLoaded.
>
> > jjb- Hide quoted text -
>
> > - Show quoted text -
>
> I'll give it a try, thanks..- Hide quoted text -

>
> - Show quoted text -

I can reproduce the problem on XP SP 3 with only Firefox 3.6 Beta 4
and Firebug 1.5x.0b5 installed (no other software has been installed
on the system)

Steps to reproduce:

1. Open google.com in FF
2. Enter a search string and refresh the page a few times
3. Go to the home page
4. Clear traces in Firebug
5. go back to the previous page (using the back button)

I don’t see TabProgressListener.OnStateChange STATE_IS_DOCUMENT events
at all plus I don’t see any pageshow nor DomContentLoaded events being
fired. Firebug does add an event listener but its not begin invoked.

Let me know what you guys think? I believe this issue was introduced
in Firefox 3.0

The logs

Firebug: 1.5X.0b5
Firefox: 3.6b4, 1.9.2b4, 20091124213835, en-US
Export Date: Wed, 02 Dec 2009 00:25:16 GMT
==========================================

1. [DBG_WINDOWS] TabProgressListener.onLocationChange
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
to: http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
no firebug
chrome://firebug/content/tabWatcher.js (621)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

2. [DBG_WINDOWS] tabWatcher.watchTopWindow for:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd,
tab: panel1259711507989
chrome://firebug/content/tabWatcher.js (97)
chrome://firebug/content/tabWatcher.js (624)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

3. [DBG_WINDOWS] tabWatcher.watchTopWindow addEventListener for
pageshow, DomContentLoaded
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
chrome://firebug/content/tabWatcher.js (167)
chrome://firebug/content/tabWatcher.js (624)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

4. [DBG_WINDOWS] watchTopWindow context.loaded:true for http://www.google.com/
chrome://firebug/content/tabWatcher.js (206)
chrome://firebug/content/tabWatcher.js (624)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

5. [DBG_WINDOWS] tabWatcher context *** SHOW *** (watchContext), id:
4842, uri: http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
chrome://firebug/content/tabWatcher.js (487)
chrome://firebug/content/tabWatcher.js (228)
chrome://firebug/content/tabWatcher.js (207)
chrome://firebug/content/tabWatcher.js (624)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

6. [extensions.firebug] setFirebugContext http://www.google.com/ in
chrome://browser/content/browser.xul has wrapped: undefined
chrome://firebug/content/chrome.js (588)
chrome://firebug/content/firebug.js (1643)
chrome://firebug/content/lib.js (3140)
chrome://firebug/content/tabWatcher.js (489)
chrome://firebug/content/tabWatcher.js (228)
chrome://firebug/content/tabWatcher.js (207)
chrome://firebug/content/tabWatcher.js (624)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

7. [extensions.firebug] showBar(false) for browser
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
FirebugContext [object Object]
chrome://firebug/content/firebug.js (980)
chrome://firebug/content/firebug.js (1672)
chrome://firebug/content/lib.js (3140)
chrome://firebug/content/tabWatcher.js (489)
chrome://firebug/content/tabWatcher.js (228)
chrome://firebug/content/tabWatcher.js (207)
chrome://firebug/content/tabWatcher.js (624)
chrome://browser/content/tabbrowser.xml (516)
()
chrome://global/content/bindings/browser.xml (112)
chrome://browser/content/tabbrowser.xml (2435)
chrome://browser/content/browser.js (1422)
chrome://browser/content/browser.xul (1)

8. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://www.google.com/images/nav_logo7.png, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(105)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(119)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(120)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(109)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(116)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(120)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(115)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

9. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://news.google.com/news/tbn/ubELl34-EpoJ, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(107)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(116)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(120)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(115)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

10. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
about:document-onload-blocker, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(107)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(116)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(120)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(115)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

11. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://news.google.com/news/tbn/ubELl34-EpoJ, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(107)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(116)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(120)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(115)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(114)

12. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://www.google.com/images/nav_logo7.png, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

13. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://www.google.com/images/nav_logo7.png, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

14. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
about:document-onload-blocker, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

15. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://www.google.com/images/nav_logo7.png, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)
()
file:///C:/Documents and Settings/John Joe/Application Data/
Mozilla/Firefox/Profiles/jmfs23r2.default/extensions/
fir...@software.joehewitt.com/components/firebug-channel-listener.js
(170)

16. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://www.google.com/images/nav_logo7.png, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)
()
file:///C:/Documents and Settings/John Joe/Application Data/
Mozilla/Firefox/Profiles/jmfs23r2.default/extensions/
fir...@software.joehewitt.com/components/firebug-channel-listener.js
(170)

17. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
about:document-onload-blocker, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)
()
file:///C:/Documents and Settings/John Joe/Application Data/
Mozilla/Firefox/Profiles/jmfs23r2.default/extensions/
fir...@software.joehewitt.com/components/firebug-channel-listener.js
(170)

18. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://www.google.com/images/nav_logo7.png, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)
()
file:///C:/Documents and Settings/John Joe/Application Data/
Mozilla/Firefox/Profiles/jmfs23r2.default/extensions/
fir...@software.joehewitt.com/components/firebug-channel-listener.js
(170)

19. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
about:document-onload-blocker, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

20. [DBG_WINDOWS] TabProgressListener.onStateChange to: about:document-
onload-blocker STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (634)
chrome://browser/content/tabbrowser.xml (463)

21. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://clients1.google.com/generate_204, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(32)
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
()

http://www.google.com/extern_js/f/CgJlbhICdXMrMAo4QkAILCswDjgKLCswFjgULCswFzgELCswGDgELCswGTgNLCswHTgbLCswJTjJiAEsKzAmOAgsKzAnOAIsKzAqOAIsKzArOAgsKzA8OAAsKzBFOAAs/Y3ut8jJ-OXk.js
(120)

22. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
about:document-onload-blocker, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_START, STATE_IS_REQUEST, STATE_IS_BROKEN, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)
()
file:///C:/Documents and Settings/John Joe/Application Data/
Mozilla/Firefox/Profiles/jmfs23r2.default/extensions/
fir...@software.joehewitt.com/components/firebug-channel-listener.js
(198)

23. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
http://clients1.google.com/generate_204, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)
()
file:///C:/Documents and Settings/John Joe/Application Data/
Mozilla/Firefox/Profiles/jmfs23r2.default/extensions/
fir...@software.joehewitt.com/components/firebug-channel-listener.js
(198)

24. [DBG_WINDOWS] FrameProgressListener.onStateChanged for:
about:document-onload-blocker, win:
http://www.google.com/#hl=en&source=hp&q=google&btnG=Google+Search&aq=f&aqi=g10&oq=google&fp=6b22d27f49a5e7dd
STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (648)

25. [DBG_WINDOWS] TabProgressListener.onStateChange to: about:document-
onload-blocker STATE_STOP, STATE_IS_REQUEST, STATE_SECURE_MED
chrome://firebug/content/tabWatcher.js (634)
chrome://browser/content/tabbrowser.xml (463)

John J. Barton

unread,
Dec 2, 2009, 12:39:07 AM12/2/09
to
Jens wrote:
> On Nov 25, 11:40 am, Jens <jenslsoren...@gmail.com> wrote:
>> On Nov 23, 10:46 pm, "John J. Barton" <johnjbar...@johnjbarton.com>
...

> Steps to reproduce:
>
> 1. Open google.com in FF
> 2. Enter a search string and refresh the page a few times
> 3. Go to the home page
> 4. Clear traces in Firebug
> 5. go back to the previous page (using the back button)

That's it? Just the back button?

>
> I don�t see TabProgressListener.OnStateChange STATE_IS_DOCUMENT events
> at all plus I don�t see any pageshow nor DomContentLoaded events being


> fired. Firebug does add an event listener but its not begin invoked.
>

> Let me know what you guys think? ...

I think you should open a bugzilla or Firebug bug report with your test
case and trace. Then Boris can tell us that Firebug is causing the
problem ;-).

jjb

Boris Zbarsky

unread,
Dec 2, 2009, 12:25:01 PM12/2/09
to
On 12/1/09 7:35 PM, Jens wrote:
> I don�t see TabProgressListener.OnStateChange STATE_IS_DOCUMENT events
> at all plus I don�t see any pageshow nor DomContentLoaded events being
> fired.

How are you looking for those events?

> Firebug does add an event listener but its not begin invoked.

What does it add the listener to?

In general, pageshow/pagehide Just Work. If they didn't, the world
(including the Firefox UI, last I checked) would be broken. So my
initial guess is that you're doing something wrong.

-Boris

Jens

unread,
Dec 2, 2009, 1:16:36 PM12/2/09
to
On Dec 2, 9:25 am, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 12/1/09 7:35 PM, Jens wrote:
>
> > I don’t see TabProgressListener.OnStateChange STATE_IS_DOCUMENT events
> > at all plus I don’t see any pageshow nor DomContentLoaded events being

> > fired.
>
> How are you looking for those events?
>
> > Firebug does add an event listener but its not begin invoked.
>
> What does it add the listener to?
>
> In general, pageshow/pagehide Just Work.  If they didn't, the world
> (including the Firefox UI, last I checked) would be broken.  So my
> initial guess is that you're doing something wrong.
>
> -Boris

I followed John's steps

"Open Firebug Tracing". Set option WINDOWS. When you get to step 4,
clear the tracing console, then step 4. Lots of onStateChange events
and
DOMContentLoaded. "

What you see in the above logs is all that Firebug generated when
enabling the 'WINDOWS' options

Jens

unread,
Dec 2, 2009, 1:35:56 PM12/2/09
to
> enabling the 'WINDOWS' options- Hide quoted text -

>
> - Show quoted text -

You can find the logs and AVI recording which illustrated the problem
(AVI file can be played VLC player) here:

ftp://ftp.jenssorensen.net/
Username: public
Password: Public^1

Boris Zbarsky

unread,
Dec 2, 2009, 1:45:24 PM12/2/09
to
On 12/2/09 1:16 PM, Jens wrote:
> I followed John's steps
>
> "Open Firebug Tracing". Set option WINDOWS. When you get to step 4,
> clear the tracing console, then step 4. Lots of onStateChange events
> and
> DOMContentLoaded. "

Oh. Well. I have no idea what Firebug tracing logs; it may or may not
have much correspondence with the events that actually fire. Given that
it's not showing pagehide/pageshow at all in a situation where I know
they fire, I'd say its correspondence for those events is 0. I can't
speak to its handling of onStateChange.

-Boris

Boris Zbarsky

unread,
Dec 2, 2009, 1:46:35 PM12/2/09
to
On 12/2/09 1:35 PM, Jens wrote:
> You can find the logs and AVI recording which illustrated the problem
> (AVI file can be played VLC player) here:

Let's back up. You have some code. You register an event listener. It
doesn't get events you expect to get. Right?

Where does Firebug come in?

What does your code actually do? Can you put up a testcase showing your
problem somewhere?

-Boris

Jens

unread,
Dec 2, 2009, 3:56:26 PM12/2/09
to

Sure.. I’ll put up a test case.. / small extension that illustrates
the problem

Having said that.. if I navigate to another site or don’t use the back
button in the scenario described then I (as well as Firebug) get
notified.
It’s not like the WebProgressListner fails in all scenarios, - we (I
and Firebug) just don’t get notified in scenario that I have
described.

Jens

unread,
Dec 7, 2009, 2:50:28 PM12/7/09
to


1. Open firefox and go to http://www.google.com
2. Search for "Test"
3. From the search result page perform another search for "Hello"
4. Now go back and forth between the search results, -
“onStateChange” is not being invoked with the STATE_IS_DOCUMENT
flag. A bug or by design?

The Code:

var myListener =
{
QueryInterface: function(aIID)
{
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsISupports))
return this;
throw Components.results.NS_NOINTERFACE;
},

onStateChange: function(aWebProgress, aRequest, aFlag, aStatus)
{
if( aFlag &
Components.interfaces.nsIWebProgressListener.STATE_IS_DOCUMENT )
{
alert("STATE_IS_DOCUMENT");
}
},
onLocationChange: function(aProgress, aRequest, aURI) { },
onProgressChange: function(aWebProgress, aRequest, curSelf, maxSelf,
curTot, maxTot) { },
onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
{ },
onSecurityChange: function(aWebProgress, aRequest, aState) { }
}

var myExtension = {
init: function() {
gBrowser.addProgressListener(myListener,
Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);
},
uninit: function() {
gBrowser.removeProgressListener(myListener);
},
};

window.addEventListener("load", function() {myExtension.init();},
false);
window.addEventListener("unload", function() {myExtension.uninit();},
false);


Jens

unread,
Dec 18, 2009, 1:03:13 AM12/18/09
to
On Dec 7, 11:50 am, Jens <jenslsoren...@gmail.com> wrote:
> On Dec 2, 12:56 pm, Jens <jenslsoren...@gmail.com> wrote:
>
>
>
>
>
> > On Dec 2, 10:46 am, Boris Zbarsky <bzbar...@mit.edu> wrote:
>
> > > On 12/2/09 1:35 PM, Jens wrote:
>
> > > > You can find the logs and AVI recording which illustrated the problem
> > > > (AVI file can be played VLC player) here:
>
> > > Let's back up.  You have some code.  You register an event listener.  It
> > > doesn't get events you expect to get.  Right?
>
> > > Where does Firebug come in?
>
> > > What does your code actually do?  Can you put up a testcase showing your
> > > problem somewhere?
>
> > > -Boris
>
> > Sure.. I’ll put up a test case.. / small extension that illustrates
> > the problem
>
> > Having said that.. if I navigate to another site or don’t use the back
> > button in the scenario described then I (as well as Firebug) get
> > notified.
> > It’s not like the WebProgressListner fails in all scenarios, - we (I
> > and Firebug) just don’t get notified in scenario that I have
> > described.
>
> 1. Open firefox and go tohttp://www.google.com

> 2. Search for "Test"
> 3. From the search result page perform another search for "Hello"
> 4. Now go back and forth between the search results, -
> “onStateChange”  is not being invoked with the STATE_IS_DOCUMENT
> flag.  Abugor by design?
> false);- Hide quoted text -

>
> - Show quoted text -

Any update Boris?

Boris Zbarsky

unread,
Dec 18, 2009, 1:15:51 AM12/18/09
to
On 12/17/09 10:03 PM, Jens wrote:
> Any update Boris?

My Dec 11 message in this thread covers things, no?

-Boris

Jens

unread,
Dec 18, 2009, 5:48:16 PM12/18/09
to

I think it got lost.. I dont see it..

Boris Zbarsky

unread,
Dec 18, 2009, 6:01:27 PM12/18/09
to
On 12/18/09 2:48 PM, Jens wrote:
> I think it got lost.. I dont see it..

Interesting. It doesn't show up in Google Groups either. Shows up fine
in the news.mozilla.org view. Here it is, just so you don't have to
pull out a news reader:

On 12/7/09 11:50 AM, Jens wrote:
> 1. Open firefox and go to http://www.google.com


> 2. Search for "Test"
> 3. From the search result page perform another search for "Hello"
> 4. Now go back and forth between the search results, -

> �onStateChange� is not being invoked with the STATE_IS_DOCUMENT


> flag. A bug or by design?

When I do this, I see STATE_STOP | STATE_IS_DOCUMENT notifications being
dispatched on the Gecko end just fine.

> gBrowser.addProgressListener(myListener,
> Components.interfaces.nsIWebProgress.NOTIFY_STATE_DOCUMENT);

Oh, gBrowser. That means you're getting stuff as filtered by
nsBrowserStatusFilter, and it filters this notification out. See
http://mxr.mozilla.org/mozilla-central/source/xpfe/browser/src/nsBrowserStatusFilter.cpp#169

In this case, the flags that are set are:

STATE_STOP | STATE_IS_DOCUMENT | STATE_RESTORING

Neither NETWORK nor REQUEST are set, since neither of those was in fact
happening.

-Boris

0 new messages