switching tabs while loading https site causes cert retrieval errors
I was noticing a lot of the following errors (in the javascript error console) when loading lots of tabs simultaneously (such as on browser restart):
Error: browser.securityUI.SSLStatus is undefined Source File: chrome://monkeysphere/content/monkeysphere.js Line: 54
The line in question is the xul-ext trying to retrieve the site cert when the security state is SECURE. I seem to be able to reproduce this by loading an https site in one tab, and then immediately switching to another tab.
Sometimes I also get this error with that same procedure:
Error: cert is undefined Source File: file:///usr/share/mozilla/extensions/%7Bec8030f7-c20a-464f-9b0e-13a3a9e97384%7D/tls-xul-ext@monkeysphere.info/modules/monkeysphere.jsm Line: 168
This is from the createAgentPostData function, which is passed the cert that would be retrieved in the call that is producing the first error. I'm not sure why I get one error or the other.
The checkSite function is called from the tabProgressListener and is supposed to be passed the appropriate aBrowser object for the relevant tab, from which it can find the site cert. However, this error seems to imply that the aBrowser is changing when the tab changes, which seems to defy what the tabProgressListener is supposed to be doing. The second error seems to indicate that the cert object that has been returned is itself changing between the time that it is retrieved and passed to createAgentPostData.
It's a little disturbing, since it seems to indicate that we could sometimes be passing around the wrong cert.
(from redmine: created on 2010-05-06)