15 Commits

Author SHA1 Message Date
edburns%acm.org
3e78a4fbf3 Memory audit of code in src directory. Found and fixed some leaks.
Declaring this directory memory clean.

M src/Pluglet.cpp
M src/Pluglet.h

- use do_GetService instead of servman->GetServiceByContractID

- do not keep a reference to plugletEngine as an ivar

M src/PlugletFactory.cpp
M src/PlugletFactory.h

- use nsnull instead of NULL

- do not keep a reference to plugletEngine as an ivar

- use PL_strdup and PL_strfree to duplicate and free strings

M src/PlugletsDir.cpp

- use PL_strdup and PL_strfree to duplicate and free strings


git-svn-id: svn://10.0.0.236/trunk@215043 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 20:10:17 +00:00
edburns%acm.org
fbd0e42fb9 This change-bundle fixes memory allocation in streams. Next step is to
make a final pass to make sure we are not leaking memory.  After that, I
want to clean up the build system, and the samples.

M build.xml

- Call make export in mozilla directory

- Fix clean target

M mozilla/Makefile.in

- Added export target
M classes/org/mozilla/pluglet/PlugletLoader.java

- avoid ambiguity by casting

+	    CodeSource codesource = new CodeSource(url,(java.security.cert.Certificate []) null);

M examples/MediaPlayer/JMPlayer.java

- remove debug printfs

M mozilla/npAPInsIInputStreamShim.cpp
M mozilla/npAPInsIInputStreamShim.h

- remove debug printfs

- fix buffer allocation, refactor into its own method.

- Use NPN_Mem* methods for memory allocation.

- isolate lock access to private methods.  Avoids locking when we
  already own the lock, which would cause an assertion.

M mozilla/nppluglet.cpp

- in dtor, check for null mScriptablePeer ivar before accessing it.

M mozilla/nsScriptablePeer.cpp

- whitespace

M src/Pluglet.cpp

- get the plugletEngine from do_GetService().

M src/PlugletEngine.cpp
M src/PlugletFactory.cpp
M src/PlugletLoader.cpp

- remove debug printfs

M test/test.java

- added test finalize.


build.xml classes/org/mozilla/pluglet/PlugletLoader.java examples/MediaPlayer/JMPlayer.java mozilla/Makefile.in mozilla/npAPInsIInputStreamShim.cpp mozilla/npAPInsIInputStreamShim.h mozilla/nppluglet.cpp mozilla/nsScriptablePeer.cpp src/Pluglet.cpp src/PlugletEngine.cpp src/PlugletFactory.cpp src/PlugletLoader.cpp test/test.java


git-svn-id: svn://10.0.0.236/trunk@214609 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-02 18:55:50 +00:00
edburns%acm.org
53efe6b0fd M mozilla/nppluglet.cpp
M mozilla/nppluglet.h
M src/Pluglet.cpp
M src/Pluglet.h
M src/PlugletEngine.cpp

SetWindow works.  Next step is to try hook up scriptability.


git-svn-id: svn://10.0.0.236/trunk@213586 18797224-902f-48f8-a5cc-f745e15eee43
2006-10-13 14:45:14 +00:00
edburns%acm.org
908f89a2bf I now have the pluglet.dll XPCOM module loading. The reason it was not
loading: it depends on jvm.dll, which was not on my path.  I had to add
%JDKHOME%\jre\bin\client to my path and now it loaded. Thanks to shaver
and plasticmillion on #developers for the tip to use depends.exe, the
Dependency Walker.  What a nice tool.

Of course, there is now a crash after it loads, which will be my next
step after this checkin.

A plugins/src/iPlugletEngine.idl
A plugins/src/iPlugletManager.idl

- make IDL files for our external interfaces.

M plugins/src/Makefile.in

- move PlugletEngine.cpp to the top of the list.

M plugins/src/PlugletEngine.cpp
M plugins/src/PlugletEngine.h

- big changes here.  Make this a proper generic XPCOM component.

- use the iPlugletManager interface, and the nsICategoryManager
  to make sure we get called at startup.

M plugins/src/Pluglet.cpp
M plugins/src/Pluglet.h
M plugins/src/PlugletFactory.cpp
M plugins/src/PlugletFactory.h
M plugins/src/PlugletInputStream.cpp
M plugins/src/PlugletInputStream.h
M plugins/src/PlugletLoader.cpp
M plugins/src/PlugletManager.cpp
M plugins/src/PlugletPeer.cpp
M plugins/src/PlugletStreamInfo.cpp
M plugins/src/PlugletStreamListener.cpp
M plugins/src/PlugletViewWindows.cpp
M plugins/src/PlugletsDir.cpp
M plugins/src/Registry.cpp

- remove static method PlugletEngine::GetJNIEnv, in favor of instance
  method and use of nsIServiceManager.


git-svn-id: svn://10.0.0.236/trunk@200339 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-19 18:50:01 +00:00
edburns%acm.org
4cf929cbd3 This change-bundle starts the process of re-activating pluglets.
Next step is to figure out the best way to fix these unresolved symbols
at link time when building pluglet.dll

/cygdrive/d/Projects/mozilla/MOZILLA_NIH/FIREFOX_1_5_0_1/mozilla/./build/cygwin-wrapper link -NOLOGO -DLL -OUT:pluglet.dll -PDB:pluglet.pdb -SUBSYSTEM:WINDOWS  List.obj Pluglet.obj PlugletEngine.obj PlugletFactory.obj PlugletInputStream.obj PlugletLoader.obj PlugletManager.obj PlugletPeer.obj PlugletStreamInfo.obj PlugletStreamListener.obj PlugletsDir.obj Registry.obj PlugletViewFactory.obj   ./module.res   -DEBUG -DEBUGTYPE:CV         kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib D:\Files_2k\j2sdk1.4.2_03/lib/jvm.lib ../../../dist/lib/xpcom.lib ../../../dist/lib/xpcom_core.lib ../../../dist/lib/nspr4.lib ../../../dist/lib/plc4.lib ../../../dist/lib/plds4.lib
   Creating library pluglet.lib and object pluglet.exp
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsFileSpec::~nsFileSpec(void)" (__imp_??1nsFileSpec@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsDirectoryIterator::~nsDirectoryIterator(void)" (__imp_??1nsDirectoryIterator@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class nsDirectoryIterator & __thiscall nsDirectoryIterator::operator++(void)" (__imp_??EnsDirectoryIterator@@QAEAAV0@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsDirectoryIterator::nsDirectoryIterator(class nsFileSpec const &,int)" (__imp_??0nsDirectoryIterator@@QAE@ABVnsFileSpec@@H@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsFileSpec::nsFileSpec(char const *,int)" (__imp_??0nsFileSpec@@QAE@PBDH@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall nsSpecialSystemDirectory::~nsSpecialSystemDirectory(void)" (__imp_??1nsSpecialSystemDirectory@@UAE@XZ)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall nsFileSpec::operator+=(char const *)" (__imp_??YnsFileSpec@@QAEXPBD@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall nsSpecialSystemDirectory::nsSpecialSystemDirectory(enum nsSpecialSystemDirectory::SystemDirectories)" (__imp_??0nsSpecialSystemDirectory@@QAE@W4SystemDirectories@0@@Z)
PlugletsDir.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall nsFileSpec::GetCString(void)const " (__imp_?GetCString@nsFileSpec@@QBEPBDXZ)
PlugletViewFactory.obj : error LNK2001: unresolved external symbol "public: __thiscall PlugletViewWindows::PlugletViewWindows(void)" (??0PlugletViewWindows@@QAE@XZ)
pluglet.dll : fatal error LNK1120: 10 unresolved externals

M makefiles

+java/plugins/Makefile
+java/plugins/src/Makefile

Add generation of these Makefiles

M plugins/src/Makefile.in

- copy some content from webclient

M plugins/src/Pluglet.cpp
M plugins/src/PlugletEngine.cpp
M plugins/src/PlugletStreamListener.cpp

- Changes from John Sublet.


git-svn-id: svn://10.0.0.236/trunk@192678 18797224-902f-48f8-a5cc-f745e15eee43
2006-03-21 03:25:34 +00:00
idk%eng.sun.com
5633d0bbfb Added logging to pluglet module
a = laa@sparc.spb.su
r = idk@eng.sun.com

Added workaround for 24194
a = idk@eng.sun.com


git-svn-id: svn://10.0.0.236/trunk@58067 18797224-902f-48f8-a5cc-f745e15eee43
2000-01-18 02:53:58 +00:00
idk%eng.sun.com
c76f9909a2 19465
Port pluglets to linux and Solaris
(This is not part of the build)


git-svn-id: svn://10.0.0.236/trunk@54082 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-20 23:19:40 +00:00
idk%eng.sun.com
51254cf0e7 bug 18180
Names changed
Pluglet->PlugletFactory, *PlugletInstance*->*Pluglet*


git-svn-id: svn://10.0.0.236/trunk@52992 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-09 10:28:46 +00:00
dmose%mozilla.org
ce50f7d151 updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@52900 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-06 02:47:15 +00:00
idk%eng.sun.com
307fe1df58 fix for 17454
changed strncmp to PL_strncasecmp


git-svn-id: svn://10.0.0.236/trunk@52405 18797224-902f-48f8-a5cc-f745e15eee43
1999-11-01 20:04:57 +00:00
idk%eng.sun.com
9599670719 Fix 16230
Call AddRef for newly created PlugletInsance
r = akhil.arora@sun.com


git-svn-id: svn://10.0.0.236/trunk@50499 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-12 23:01:44 +00:00
idk%eng.sun.com
651e1ddd8a Bug <a href=http://bugzilla.mozilla.org/show_bug.cgi?id=15892> 15892 </a>
increment pointer to  mime description string before calling strchr


git-svn-id: svn://10.0.0.236/trunk@50417 18797224-902f-48f8-a5cc-f745e15eee43
1999-10-12 03:29:27 +00:00
idk%eng.sun.com
ab18209f8a Add Registry class for storing information about java-c++
objects binding


git-svn-id: svn://10.0.0.236/trunk@49026 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-25 02:53:56 +00:00
idk%eng.sun.com
3f8850f8d2 Add support for multiple pluglets
add some checkings


git-svn-id: svn://10.0.0.236/trunk@48900 18797224-902f-48f8-a5cc-f745e15eee43
1999-09-23 06:17:12 +00:00
idk%eng.sun.com
9d2f8ed652 Initial pluglets checkin.
git-svn-id: svn://10.0.0.236/trunk@44978 18797224-902f-48f8-a5cc-f745e15eee43
1999-08-28 04:39:56 +00:00