I've got the workaround sorted for now, similar to how firecookie and
the network panel. There appears to be a chance that network requests
will be mismatched. I experienced some already with what appeared to
be late network requests (possibly being fired when the document is
unloaded) of the previous page getting associated with the next
navigation. Will try to develop a concrete test case and post later.

A minor question I had was w.r.t firecookie.js not using the existing
firebug-http-observer interface. Accoding to the comments in firebug-
http-observer.js:

/**
 * This service is intended as the only HTTP observer registered by
Firebug.
 * All FB extensions and Firebug itself should register a listener
within this
 * servise in order to listen for http-on-modify-request and http-on-
examine-response.
 * See also: http://developer.mozilla.org/en/Setting_HTTP_request_headers
 */

Other than that, I will shift focus to capturing the DOM events next.

Regards,
Manoj

On Nov 26, 6:45 am, Jan Odvarko <[EMAIL PROTECTED]> wrote:
> > Subsequent navigations, return the previous context (the one about to
> > be destroyed.)  The framework calls initContext() after the initial
> > request.
>
> Yes, this very confusing piece in Firebug. Unfortunately I don't
> knowhow to improve that. I have tried that the other day, but gave up,
> we need more support from Firefox here:
> I think following bugs are directly 
> related:https://bugzilla.mozilla.org/show_bug.cgi?id=391177https://bugzilla.mozilla.org/show_bug.cgi?id=342715
>
> The biggest problem here is the tabWatcher.js that is creating the
> context (using tabContext.js) too late.
>
> So, at the time when http-on-modify-request event is fired, the
> current window is still associated with a context (which is, as you
> saying the previous one).
>
> See my logs (shortened) showing order of important events (copied from
> tracing-console, generated by my helper monitor extension). These logs
> have been generated when I went 
> fromhttp://www.softwareishard.com/blog/index.php/blog/index.php
> tohttp://www.google.cz/page.
>
> httpObserver.observe http-on-modify-request,http://www.google.cz/
> httpObserver.observe http-on-examine-response,http://www.google.cz/
> MonitorModel.unwatchWindow:http://www.softwareishard.com/blog/index.php/blog/index.php
> MonitorModel.destroyContext for:http://www.softwareishard.com/blog/index.php
> MonitorModel.initContext for:http://www.google.cz/
> MonitorModel.watchWindow:http://www.google.cz/
> httpObserver.observe 
> http-on-modify-request,http://www.google.cz/intl/en_com/images/logo_plain.png
> httpObserver.observe 
> http-on-modify-request,http://www.google.cz/extern_js/f/CgJjcxICY3orMAo4CywrMBg4Ayw/7xn1JbUo...
> MonitorModel.loadedContext for:http://www.google.cz/
> MonitorModel.showPanel: net
> etc...
>
> You can clearly see that the previous context (softwareishard.com) is
> destroyed *after* the new page (google.cz) started to load. Also the
> new context is initialized (initContext) after the http-on-* events.
> All the other page requests (logo_plain.png, etc.) are done properly
> when the new context (google.cz) is ready to be used. But the first
> document request is done to early.
>
> This explains why:
> var win = getWindowForRequest(subject);
> var context = TabWatcher.getContextByWindow(win);
> returns the about:blank (I believe it was the previous page, perhaps
> when you started FF) if it's used within onModifyRequest. Yes there is
> still the previous context.
>
> Of course, you can do the same as Firebug. In order to monitor (and
> store) all requests made by a page, the net panel is creating
> temporary context within onModifyRequest (http-on-modify-request
> handler) method. This temp context is created for the first document
> request and all info stored into it is merged with real context in
> initContext.
>
> See net.js for more info how it's 
> done.http://code.google.com/p/fbug/source/browse/branches/firebug1.4/conte...
>
> I have used the same for Firecookie (this code could be perhaps easier
> to 
> explore)http://code.google.com/p/firecookie/source/browse/trunk/chrome/conten...
>
> I welcome any suggestions and improvements!
>
> Honza
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to