Hello,

I am working on Javascript instrumentation for Firefox 1.0x using a chrome extension. The intent is to time how long it takes for the browser to fetch each element over the network. Even to the extent of timing each phase of the transfer. For example Host Resolution Time, Connection Time, Server Response Time and Delivery Time. Not all elements will resolve a host or make a new connection, but each will have a Server Response Time.

My problem is this. I don't see all of the events that I should in onStatusChange. Most of the time some of the STATUS messages that I know must have happened do not appear to my onStatusChange function.

For example; this is an example of what my onStatusChange function see when things go right:

        timestamp = 2005-05-17T08:15:41.843-4:00
        offset = 1116332141843
        statusText = STATUS_RESOLVING
        status = 2152398851
        message = Looking up images.bizrate.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:15:41.890-4:00
        offset = 1116332141890
        statusText = STATUS_CONNECTING_TO
        status = 2152398855
        message = Connecting to images.bizrate.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:15:41.906-4:00
        offset = 1116332141906
        statusText = STATUS_CONNECTED_TO
        status = 2152398852
        message = Connected to images.bizrate.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:15:41.906-4:00
        offset = 1116332141906
        statusText = STATUS_WAITING_FOR
        status = 2152398858
        message = Waiting for images.bizrate.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

I have never recorded the STATUS_SENDING_TO event. Does that one still occur?

When I fail to receive status messages it can look like this:

        timestamp = 2005-05-17T08:12:21.781-4:00
        offset = 1116331941781
        statusText = STATUS_RESOLVING
        status = 2152398851
        message = Looking up my.yahoo.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:12:21.843-4:00
        offset = 1116331941843
        statusText = STATUS_CONNECTED_TO
        status = 2152398852
        message = Connected to my.yahoo.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:12:21.843-4:00
        offset = 1116331941843
        statusText = STATUS_WAITING_FOR
        status = 2152398858
        message = Waiting for my.yahoo.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

Or this:

        timestamp = 2005-05-17T08:12:22.890-4:00
        offset = 1116331942890
        statusText = STATUS_RESOLVING
        status = 2152398851
        message = Looking up us.lrd.yahoo.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:12:22.906-4:00
        offset = 1116331942906
        statusText = STATUS_CONNECTING_TO
        status = 2152398855
        message = Connecting to us.lrd.yahoo.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

        timestamp = 2005-05-17T08:12:22.953-4:00
        offset = 1116331942953
        statusText = STATUS_WAITING_FOR
        status = 2152398858
        message = Waiting for us.lrd.yahoo.com...
        eventType = status
        function = nsIWebProgressListener::onStatusChange()

Both of the above captures were missing at least on status. The problem can also occur when there is no STATUS_RESOLVING with only one or no connection status events.

I have also seen the same problem in my nsIProgressEventSink::onStatus() function which is active for those elements that do not report via nsIWebProgressListener.

My object fully implements the following interfaces:

QueryInterface : function(aIID)
{ // override nsISupports
if(
aIID.equals(nsIObserver) ||
aIID.equals(nsIWebProgressListener) ||
aIID.equals(nsIProgressEventSink) ||
aIID.equals(nsIHttpEventSink) ||
aIID.equals(nsIRequestObserver) ||
aIID.equals(nsISupportsWeakReference) ||
aIID.equals(nsISupports)) {
return this;
}
if (
aIID.equals(nsIWeakReference)) {
} else {
// unexpected QueryInterface that failed
myDump("PdWebProgress::QueryInterface(" + aIID + ") throw NS_NOINTERFACE");
}
throw NS_NOINTERFACE;
},


Is there another interface that I need to implement? I don't see messages on the console or in Venkman that indicate QueryInterface requests that I have not implemented.

Thanks,

LeRoy
_______________________________________________
Mozilla-netlib mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to