Re: scopes, execution contexts, and scripts

"John J. Barton" <[email protected]> Tue, 26 Jan 2010 11:35:37 -0800
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
Boris Zbarsky wrote:
> On 1/26/10 2:04 PM, John J. Barton wrote:
>> and how to distinguish the (and possibly..) case from
>> unload-because-we-are-being-deleted.
> 
> You can't.  But onload does mean whatever was in that window before is 
> gone.
> 
>> And so to handle this case, I guess I need to track onLocationChange
>> events for every nsIDOMWindow? I don't understand how to tell if a
>> window is being destroyed after unload vs being reused.
> 
> You can't tell right now.
> 
> I plan to add a notification (with the window id) when a window is "torn 
> down" sometime in the next 1-1.5 weeks.
> 
> -Boris

Ok, in the meantime I can delete the metadata about the unloaded window 
on the unload handler without delay and new metadata for the window will 
be created.  It means that unload handlers may not debug if they fire 
after mine.

jjb