hust-marx / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

Window refresh fires AttachWindow event before DetachWindow event in Firefox #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Attach debugger to Firefox process
2. Open window with plugin in Firefox
3. Click the page refresh button
4. Observe in debugger that AttachEvent is called before DetachEvent

The expected output is that the window should be detached before it 
AttachWindow is called for the refreshed browser window.

Original issue reported on code.google.com by amack...@gmail.com on 3 May 2010 at 10:06

GoogleCodeExporter commented 9 years ago
Seen on Firefox 3.6.3 on Windows 7.

Original comment by amack...@gmail.com on 3 May 2010 at 10:09

GoogleCodeExporter commented 9 years ago
If you do some additional debugging, you'll find that the AttachWindow event is 
the
event for the next instance of the plugin; that is, Firefox initializes the new 
page
before it destructs the old one.

There is nothing we can do about this; you just have to understand that it will
happen and make sure you aren't using any global variables or resources that 
would
make this a problem.

Original comment by taxilian on 3 May 2010 at 10:25

GoogleCodeExporter commented 9 years ago
I see, that's unfortunate. I'll fix my code.

Original comment by amack...@gmail.com on 3 May 2010 at 10:41