Issue 56878 - Browser plugin does not build without Java
Summary: Browser plugin does not build without Java
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 2.0.2
Assignee: philipp.lohmann
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-28 15:54 UTC by panbk
Modified: 2006-01-23 15:45 UTC (History)
3 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description panbk 2005-10-28 15:54:28 UTC
The functions NPN_GetJavaEnv and NPN_GetJavaPeer are, understandably, only     
available in the OJI case (see jmeng's  
extensions/source/nsplugin/source/npunix.c).  
  
However, extensions/source/plugin/base/nfuncs.cxx    
refers to them unconditionally.    
    
The simple patch below allows things to _compile_, but whether it will work    
depends on the answer to the question in comment :-)   
   
--- extensions/source/plugin/base/nfuncs.cxx	Thu Sep  8 15:51:16 2005   
+++ extensions/source/plugin/base/nfuncs.cxx	Fri Oct 28 10:26:58 2005   
@@ -105,6 +105,11 @@   
 	NPN_MemFlush,   
 	NPN_ReloadPlugins,   
+#ifdef OJI   
 	NPN_GetJavaEnv,   
 	NPN_GetJavaPeer,   
+#else   
+	NULL, // Will it be smart enough to not call us? Or do we need  
+	NULL, // to provide some error-returning shims instead?   
+#endif   
 	NPN_GetURLNotify,   
 	NPN_PostURLNotify,
Comment 1 oliver.bolte 2005-10-31 09:47:40 UTC
Reassigned to pl.
Comment 2 philipp.lohmann 2005-10-31 10:21:29 UTC
set target
Comment 3 philipp.lohmann 2005-11-28 15:51:24 UTC
would adding the following lines before the NPNetscapeFuncs also fix the problem
? This way we would still have both functions available in the table, although
they would still return NULL (as they do in any case in nfuncs.cxx).

#ifndef OJI
extern "C" {
JRIEnv*	   SAL_CALL	NP_LOADDS NPN_GetJavaEnv(void);
jref	   SAL_CALL	NP_LOADDS NPN_GetJavaPeer(NPP instance);
}
#endif
Comment 4 philipp.lohmann 2005-12-01 17:49:31 UTC
by the way extensions/source/nsplugin/source/npunix.c will use the plugin
headers which are committed in extensionsion/source/nsplugin/inc. Nobody ever
defines OJI here and it is not necessary since the headers in there bring all
information necessary for compilation with them. So what was the patch for
extensions/source/nsplugin/source/npunix.c actually good for ? And why should we
not use the very same header files for extensions/source/plugin ?
Comment 5 philipp.lohmann 2005-12-14 15:47:25 UTC
fixed in CWS vcl49

using mozilla headers now; define OJI in case SOLAR_JAVA is set
Comment 6 philipp.lohmann 2005-12-16 16:14:03 UTC
verified
Comment 7 philipp.lohmann 2006-01-23 15:45:25 UTC
seen in m152, closing