Hi John,
Thanks for the quick reply. In fact, moving my list into the context
object was the first thing I tried. However, it doesn't seem to work,
and I think I'm running into the fact that the context is not
persistent across page loads.
Below is a snippet of the log (dump() commands in my code) that
illustrates the problem. They are in the exact order that they appear
in the log (I've added lines describing the actions causing the events
to happen):
#1: load the originating page
initContext (uid=9268)
showContext (uid=9268)
loadedContext (uid=9268)
#2: click the link that has an attached handler, firing off an image
request
onStateChange: adding request (key=babb5f934417705886b92a6ebe63286e)
to list (uid=9268)
#3: browser loads link URL
destroyContext (uid=9268)
initContext (uid=24269)
showContext (uid=24269)
loadedContext (uid=24269)
processRequests: processing 0 requests (uid=24269)
onStateChange() is an overridden method on an nsIWebProgressListener,
and it writes requests to an array attached to the context.
processRequests() is a method on the module that gets called via
loadedContext(), gets passed the context, and loops over the array to
dump them to the panel.
As you can see, the old context is destroyed before the new one is in
place, so processRequests() gets the new context with an empty array.
This is exactly as I would expect, given the fact that the context
doesn't persist.
I'm not sure now if my goal is even possible. Do you have any other
thoughts or suggestions?
Thanks again,
Ross