divyang4481 / firebreath

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

StaticInitialize() called without corresponding call to StaticDeinitialize() #143

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build any plugin (default example plugin should work)
2. Install it into the browser
3. Load a single web page that does NOT use the plugin
4. Close the browser

What is the expected output? 
* No calls to StaticInitialize() or StaticDeInitialize() OR exactly one call to 
both in order.

What do you see instead?
* A call to StaticInitialize() and no corresponding call to StaticDeInitialize()

What version of FireBreath are you using? 
Firebreath 1.4 beta: firebreath-FireBreath-firebreath-1.4b4-2-g93116ac.tar.gz 

On what operating system and browsers?
Reproduced on X11 64-Bit Ubuntu Linux with Firefox 3.6.13. Not tested on other 
browsers yet, but I think this may be specific problem to linux looking at 
np_XXXmain.cpp files.

What version of your compiler or IDE are you using?
Using GCC 4.4.5

Please provide any additional information below.
I traced it to a call to NP_GetValue() requesting the plugins name in 
np_x11main.cpp which calls initPluginModule() which in turn calls the 
StaticInitialize() through constructing the module. 

It seems to me that the correct behaviour should be NOT to create a new plugin 
module instance just for calls to NP_GetValue(). Also note that the first 
pramater to the NP_GetValue() call is NULL indicating no instance has yet been 
created from what i read in the NPAPI docs.

Original issue reported on code.google.com by brendon....@gmail.com on 9 Feb 2011 at 11:04

GoogleCodeExporter commented 8 years ago
ok, I've attempted to fix this. You'll want to delete the np_x11main.cpp file 
from your plugin (if you have one) as you no longer need it in 1.4 unless you 
want to customize it -- in which case you should copy the one from 
src/PluginAuto/X11/

I don't have a good way to test this, however; it builds and seems to run, but 
I don't have a good linux dev environment set up.  Sorry it took me so long to 
get to this.

Please test ASAP and let me know.

Original comment by richarda...@gmail.com on 17 Feb 2011 at 6:59

GoogleCodeExporter commented 8 years ago
In my tests this is fixed.  IT will be in RC1

Original comment by richarda...@gmail.com on 17 Feb 2011 at 10:52