/hg/icedtea6: Remove the old plugin.
andrew at icedtea.classpath.org
andrew at icedtea.classpath.org
Tue Mar 16 15:33:34 PDT 2010
changeset d05a84d98805 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d05a84d98805
author: Andrew John Hughes <ahughes at redhat.com>
date: Tue Mar 16 22:33:10 2010 +0000
Remove the old plugin.
2010-03-16 Andrew John Hughes <ahughes at redhat.com>
* IcedTeaPlugin.cc,
* plugin/icedtea/netscape/javascript/JSException.java,
* plugin/icedtea/netscape/javascript/JSObject.java,
* plugin/icedtea/netscape/javascript/JSObjectCreatePermission.java,
* plugin/icedtea/netscape/javascript/JSProxy.java,
* plugin/icedtea/netscape/javascript/JSRunnable.java,
* plugin/icedtea/netscape/javascript/JSUtil.java,
* plugin/icedtea/sun/applet/AppletSecurityContextManager.java,
* plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java,
* plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java,
* plugin/icedtea/sun/applet/JavaConsole.java,
* plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java,
* plugin/icedtea/sun/applet/PluginAppletSecurityContext.java,
* plugin/icedtea/sun/applet/PluginAppletViewer.java,
* plugin/icedtea/sun/applet/PluginCallRequest.java,
* plugin/icedtea/sun/applet/PluginCallRequestFactory.java,
* plugin/icedtea/sun/applet/PluginClassLoader.java,
* plugin/icedtea/sun/applet/PluginCookieInfoRequest.java,
* plugin/icedtea/sun/applet/PluginCookieManager.java,
* plugin/icedtea/sun/applet/PluginDebug.java,
* plugin/icedtea/sun/applet/PluginException.java,
* plugin/icedtea/sun/applet/PluginMain.java,
* plugin/icedtea/sun/applet/PluginMessageConsumer.java,
* plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java,
* plugin/icedtea/sun/applet/PluginObjectStore.java,
* plugin/icedtea/sun/applet/PluginProxyInfoRequest.java,
* plugin/icedtea/sun/applet/PluginProxySelector.java,
* plugin/icedtea/sun/applet/PluginStreamHandler.java,
* plugin/icedtea/sun/applet/RequestQueue.java,
* plugin/icedtea/sun/applet/TestEnv.java,
* plugin/icedtea/sun/applet/VoidPluginCallRequest.java: Remove
old plugin code.
* Makefile.am: Drop ENABLE_PLUGIN blocks. Rename
ENABLE_NPPLUGIN to ENABLE_PLUGIN and IcedTeaNPPlugin to
IcedTeaPlugin. (LIVECONNECT_DIR): Use just names of
directories. (EXTRA_DIST): Drop IcedTeaPlugin.cc.
(.PHONY): Drop clean-plugs, ICEDTEANPPLUGIN_CLEAN. (clean-
patch): Drop old commands to revert plugin code copying.
(icedtea.stamp): Remove old plugin references. Change NPPlugin
references to reference Plugin. (icedtea-debug.stamp):
Likewise. (PLUGIN_SRC): Renamed from NPPLUGIN_SRC.
(PLUGIN_OBJECTS): Renamed from NPPLUGIN_OBJECTS.
($(PLUGIN_DIR)/%.o): Change from NPPLUGIN to PLUGIN.
($(PLUGIN_DIR)/IcedTeaPlugin.so): Changed from
IcedTeaNPPlugin. (clean-IcedTeaPlugin): Moved from clean-
IcedTeaNPPlugin. (IcedTeaPlugin.o): Removed.
(IcedTeaPlugin.so): Removed. (clean-IcedTeaPlugin): Removed.
(plugin.stamp): Remove old plugin dependency. (clean-
plugin): Likewise. (liveconnect.stamp): Use LIVECONNECT_DIR
rather than hardcoding directory names. (rt.stamp):
Drop LIVECONNECT_DIR. (plugs): Drop dead alias.
* acinclude.m4: (IT_CHECK_PLUGIN): Renamed from
IT_CHECK_OLD_PLUGIN. (IT_CHECK_NEW_PLUGIN): Removed.
(IT_CHECK_PLUGIN_DEPENDENCIES): No longer require
IT_CHECK_OLD_PLUGIN and IT_CHECK_NEW_PLUGIN. Require
IT_CHECK_PLUGIN. Remove enable_npplugin tests as now
assumed, being the only plugin.
(IT_CHECK_XULRUNNER_VERSION): Drop enable_npplugin test.
* plugin/icedteanp/IcedTeaJavaRequestProcessor.h: Fix
references to IcedTeaNPPlugin.h.
* plugin/icedteanp/IcedTeaPlugin.cc: Renamed from
IcedTeaNPPlugin.cc.
* plugin/icedteanp/IcedTeaPlugin.h: Renamed from
IcedTeaNPPlugin.h.
* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc,
* plugin/icedteanp/IcedTeaPluginUtils.cc,
* plugin/icedteanp/IcedTeaPluginUtils.h,
* plugin/icedteanp/IcedTeaScriptablePluginObject.h: Fix
references to IcedTeaNPPlugin.h.
diffstat:
43 files changed, 2553 insertions(+), 15622 deletions(-)
ChangeLog | 80
IcedTeaPlugin.cc | 6009 ----------
Makefile.am | 129
acinclude.m4 | 44
plugin/icedtea/netscape/javascript/JSException.java | 140
plugin/icedtea/netscape/javascript/JSObject.java | 290
plugin/icedtea/netscape/javascript/JSObjectCreatePermission.java | 47
plugin/icedtea/netscape/javascript/JSProxy.java | 58
plugin/icedtea/netscape/javascript/JSRunnable.java | 72
plugin/icedtea/netscape/javascript/JSUtil.java | 59
plugin/icedtea/sun/applet/AppletSecurityContextManager.java | 71
plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java | 76
plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java | 75
plugin/icedtea/sun/applet/JavaConsole.java | 365
plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java | 241
plugin/icedtea/sun/applet/PluginAppletSecurityContext.java | 1311 --
plugin/icedtea/sun/applet/PluginAppletViewer.java | 2004 ---
plugin/icedtea/sun/applet/PluginCallRequest.java | 85
plugin/icedtea/sun/applet/PluginCallRequestFactory.java | 62
plugin/icedtea/sun/applet/PluginClassLoader.java | 51
plugin/icedtea/sun/applet/PluginCookieInfoRequest.java | 82
plugin/icedtea/sun/applet/PluginCookieManager.java | 88
plugin/icedtea/sun/applet/PluginDebug.java | 51
plugin/icedtea/sun/applet/PluginException.java | 53
plugin/icedtea/sun/applet/PluginMain.java | 319
plugin/icedtea/sun/applet/PluginMessageConsumer.java | 119
plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java | 121
plugin/icedtea/sun/applet/PluginObjectStore.java | 132
plugin/icedtea/sun/applet/PluginProxyInfoRequest.java | 85
plugin/icedtea/sun/applet/PluginProxySelector.java | 195
plugin/icedtea/sun/applet/PluginStreamHandler.java | 479
plugin/icedtea/sun/applet/RequestQueue.java | 77
plugin/icedtea/sun/applet/TestEnv.java | 172
plugin/icedtea/sun/applet/VoidPluginCallRequest.java | 67
plugin/icedteanp/IcedTeaJavaRequestProcessor.h | 2
plugin/icedteanp/IcedTeaNPPlugin.cc | 2294 ---
plugin/icedteanp/IcedTeaNPPlugin.h | 134
plugin/icedteanp/IcedTeaPlugin.cc | 2294 +++
plugin/icedteanp/IcedTeaPlugin.h | 134
plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 2
plugin/icedteanp/IcedTeaPluginUtils.cc | 2
plugin/icedteanp/IcedTeaPluginUtils.h | 2
plugin/icedteanp/IcedTeaScriptablePluginObject.h | 2
diffs (truncated from 18525 to 500 lines):
diff -r 44393698a7c0 -r d05a84d98805 ChangeLog
--- a/ChangeLog Tue Mar 16 17:00:56 2010 +0000
+++ b/ChangeLog Tue Mar 16 22:33:10 2010 +0000
@@ -1,3 +1,83 @@ 2010-03-16 Andrew John Hughes <ahughes
+2010-03-16 Andrew John Hughes <ahughes at redhat.com>
+
+ * IcedTeaPlugin.cc,
+ * plugin/icedtea/netscape/javascript/JSException.java,
+ * plugin/icedtea/netscape/javascript/JSObject.java,
+ * plugin/icedtea/netscape/javascript/JSObjectCreatePermission.java,
+ * plugin/icedtea/netscape/javascript/JSProxy.java,
+ * plugin/icedtea/netscape/javascript/JSRunnable.java,
+ * plugin/icedtea/netscape/javascript/JSUtil.java,
+ * plugin/icedtea/sun/applet/AppletSecurityContextManager.java,
+ * plugin/icedtea/sun/applet/GetMemberPluginCallRequest.java,
+ * plugin/icedtea/sun/applet/GetWindowPluginCallRequest.java,
+ * plugin/icedtea/sun/applet/JavaConsole.java,
+ * plugin/icedtea/sun/applet/PasswordAuthenticationDialog.java,
+ * plugin/icedtea/sun/applet/PluginAppletSecurityContext.java,
+ * plugin/icedtea/sun/applet/PluginAppletViewer.java,
+ * plugin/icedtea/sun/applet/PluginCallRequest.java,
+ * plugin/icedtea/sun/applet/PluginCallRequestFactory.java,
+ * plugin/icedtea/sun/applet/PluginClassLoader.java,
+ * plugin/icedtea/sun/applet/PluginCookieInfoRequest.java,
+ * plugin/icedtea/sun/applet/PluginCookieManager.java,
+ * plugin/icedtea/sun/applet/PluginDebug.java,
+ * plugin/icedtea/sun/applet/PluginException.java,
+ * plugin/icedtea/sun/applet/PluginMain.java,
+ * plugin/icedtea/sun/applet/PluginMessageConsumer.java,
+ * plugin/icedtea/sun/applet/PluginMessageHandlerWorker.java,
+ * plugin/icedtea/sun/applet/PluginObjectStore.java,
+ * plugin/icedtea/sun/applet/PluginProxyInfoRequest.java,
+ * plugin/icedtea/sun/applet/PluginProxySelector.java,
+ * plugin/icedtea/sun/applet/PluginStreamHandler.java,
+ * plugin/icedtea/sun/applet/RequestQueue.java,
+ * plugin/icedtea/sun/applet/TestEnv.java,
+ * plugin/icedtea/sun/applet/VoidPluginCallRequest.java:
+ Remove old plugin code.
+ * Makefile.am:
+ Drop ENABLE_PLUGIN blocks. Rename ENABLE_NPPLUGIN
+ to ENABLE_PLUGIN and IcedTeaNPPlugin to IcedTeaPlugin.
+ (LIVECONNECT_DIR): Use just names of directories.
+ (EXTRA_DIST): Drop IcedTeaPlugin.cc.
+ (.PHONY): Drop clean-plugs, ICEDTEANPPLUGIN_CLEAN.
+ (clean-patch): Drop old commands to revert plugin code
+ copying.
+ (icedtea.stamp): Remove old plugin references. Change NPPlugin
+ references to reference Plugin.
+ (icedtea-debug.stamp): Likewise.
+ (PLUGIN_SRC): Renamed from NPPLUGIN_SRC.
+ (PLUGIN_OBJECTS): Renamed from NPPLUGIN_OBJECTS.
+ ($(PLUGIN_DIR)/%.o): Change from NPPLUGIN to PLUGIN.
+ ($(PLUGIN_DIR)/IcedTeaPlugin.so): Changed from
+ IcedTeaNPPlugin.
+ (clean-IcedTeaPlugin): Moved from clean-IcedTeaNPPlugin.
+ (IcedTeaPlugin.o): Removed.
+ (IcedTeaPlugin.so): Removed.
+ (clean-IcedTeaPlugin): Removed.
+ (plugin.stamp): Remove old plugin dependency.
+ (clean-plugin): Likewise.
+ (liveconnect.stamp): Use LIVECONNECT_DIR rather than
+ hardcoding directory names.
+ (rt.stamp): Drop LIVECONNECT_DIR.
+ (plugs): Drop dead alias.
+ * acinclude.m4:
+ (IT_CHECK_PLUGIN): Renamed from IT_CHECK_OLD_PLUGIN.
+ (IT_CHECK_NEW_PLUGIN): Removed.
+ (IT_CHECK_PLUGIN_DEPENDENCIES): No longer require
+ IT_CHECK_OLD_PLUGIN and IT_CHECK_NEW_PLUGIN. Require
+ IT_CHECK_PLUGIN. Remove enable_npplugin tests as now
+ assumed, being the only plugin.
+ (IT_CHECK_XULRUNNER_VERSION): Drop enable_npplugin test.
+ * plugin/icedteanp/IcedTeaJavaRequestProcessor.h:
+ Fix references to IcedTeaNPPlugin.h.
+ * plugin/icedteanp/IcedTeaPlugin.cc: Renamed from
+ IcedTeaNPPlugin.cc.
+ * plugin/icedteanp/IcedTeaPlugin.h: Renamed from
+ IcedTeaNPPlugin.h.
+ * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc,
+ * plugin/icedteanp/IcedTeaPluginUtils.cc,
+ * plugin/icedteanp/IcedTeaPluginUtils.h,
+ * plugin/icedteanp/IcedTeaScriptablePluginObject.h:
+ Fix references to IcedTeaNPPlugin.h.
+
2010-03-16 Andrew John Hughes <ahughes at redhat.com>
* patches/icedtea-override.patch:
diff -r 44393698a7c0 -r d05a84d98805 IcedTeaPlugin.cc
--- a/IcedTeaPlugin.cc Tue Mar 16 17:00:56 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6009 +0,0 @@
-/* IcedTeaPlugin -- implement OJI
- Copyright (C) 2008 Red Hat
-
-This file is part of IcedTea.
-
-IcedTea is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-IcedTea is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with IcedTea; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-#include <nsStringAPI.h>
-
-PRThread* current_thread ();
-
-#if PR_BYTES_PER_LONG == 8
-#define PLUGIN_JAVASCRIPT_TYPE jlong
-#define PLUGIN_INITIALIZE_JAVASCRIPT_ARGUMENT(args, obj) args[0].j = obj
-#define PLUGIN_JAVASCRIPT_SIGNATURE "(J)V"
-#else
-#define PLUGIN_JAVASCRIPT_TYPE jint
-#define PLUGIN_INITIALIZE_JAVASCRIPT_ARGUMENT(args, obj) args[0].i = obj
-#define PLUGIN_JAVASCRIPT_SIGNATURE "(I)V"
-#endif
-
-// System includes.
-#include <dlfcn.h>
-#include <errno.h>
-#include <libgen.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-// GLib includes.
-#include <glib.h>
-#include <glib/gstdio.h>
-
-// GTK includes.
-#include <gtk/gtk.h>
-
-// FIXME: Look into this:
-// #0 nsACString_internal (this=0xbff3016c) at ../../../dist/include/string/nsTSubstring.h:522
-// #1 0x007117c9 in nsDependentCSubstring (this=0xbff3016c, str=@0xab20d00, startPos=0, length=0) at ../../dist/include/string/nsTDependentSubstring.h:68
-// #2 0x0076a9d9 in Substring (str=@0xab20d00, startPos=0, length=0) at ../../dist/include/string/nsTDependentSubstring.h:103
-// #3 0x008333a7 in nsStandardURL::Hostport (this=0xab20ce8) at nsStandardURL.h:338
-// #4 0x008299b8 in nsStandardURL::GetHostPort (this=0xab20ce8, result=@0xbff30210) at nsStandardURL.cpp:1003
-// #5 0x0095b9dc in nsPrincipal::GetOrigin (this=0xab114e0, aOrigin=0xbff30320) at nsPrincipal.cpp:195
-// #6 0x0154232c in nsCSecurityContext::GetOrigin (this=0xab8f410, buf=0xbff30390 "\004", buflen=256) at nsCSecurityContext.cpp:126
-// #7 0x04db377e in CNSAdapter_SecurityContextPeer::GetOrigin () from /opt/jdk1.6.0_03/jre/plugin/i386/ns7/libjavaplugin_oji.so
-// #8 0x05acd59f in getAndPackSecurityInfo () from /opt/jdk1.6.0_03/jre/lib/i386/libjavaplugin_nscp.so
-// #9 0x05acc77f in jni_SecureCallMethod () from /opt/jdk1.6.0_03/jre/lib/i386/libjavaplugin_nscp.so
-// #10 0x05aba88d in CSecureJNIEnv::CallMethod () from /opt/jdk1.6.0_03/jre/lib/i386/libjavaplugin_nscp.so
-// #11 0x04db1be7 in CNSAdapter_SecureJNIEnv::CallMethod () from /opt/jdk1.6.0_03/jre/plugin/i386/ns7/libjavaplugin_oji.so
-// #12 0x0153e62f in ProxyJNIEnv::InvokeMethod (env=0xa8b8040, obj=0x9dad690, method=0xa0ed070, args=0x0) at ProxyJNI.cpp:571
-// #13 0x0153f91c in ProxyJNIEnv::InvokeMethod (env=0xa8b8040, obj=0x9dad690, method=0xa0ed070, args=0xbff3065c "\235\225$") at ProxyJNI.cpp:580
-// #14 0x0153fdbf in ProxyJNIEnv::CallObjectMethod (env=0xa8b8040, obj=0x9dad690, methodID=0xa0ed070) at ProxyJNI.cpp:641
-
-// timeout (in seconds) for various calls to java side
-#define TIMEOUT 180
-
-#define NOT_IMPLEMENTED() \
- PLUGIN_DEBUG_1ARG ("NOT IMPLEMENTED: %s\n", __PRETTY_FUNCTION__)
-
-#define ID(object) \
- (object == NULL ? (PRUint32) 0 : reinterpret_cast<JNIReference*> (object)->identifier)
-
-static int plugin_debug = 0;
-
-#if 1
-// Debugging macros.
-
-#define PLUGIN_DEBUG_0ARG(str) \
- do \
- { \
- if (plugin_debug) \
- { \
- fprintf (stderr, str); \
- } \
- } while (0)
-
-#define PLUGIN_DEBUG_1ARG(str, arg1) \
- do \
- { \
- if (plugin_debug) \
- { \
- fprintf (stderr, str, arg1); \
- } \
- } while (0)
-
-#define PLUGIN_DEBUG_2ARG(str, arg1, arg2) \
- do \
- { \
- if (plugin_debug) \
- { \
- fprintf (stderr, str, arg1, arg2); \
- } \
- } while (0)
-
-#define PLUGIN_DEBUG_3ARG(str, arg1, arg2, arg3) \
- do \
- { \
- if (plugin_debug) \
- { \
- fprintf (stderr, str, arg1, arg2, arg3); \
- } \
- } while (0)
-
-#define PLUGIN_DEBUG_4ARG(str, arg1, arg2, arg3, arg4) \
- do \
- { \
- if (plugin_debug) \
- { \
- fprintf (stderr, str, arg1, arg2, arg3, arg4); \
- } \
- } while (0)
-
-#define PLUGIN_DEBUG(message) \
- PLUGIN_DEBUG_1ARG ("ICEDTEA PLUGIN: %s\n", message)
-
-#define PLUGIN_DEBUG_TWO(first, second) \
- PLUGIN_DEBUG_2ARG ("ICEDTEA PLUGIN: %s %s\n", \
- first, second)
-
-// Tracing.
-class Trace
-{
-public:
- Trace (char const* name, char const* function)
- {
- Trace::name = name;
- Trace::function = function;
- PLUGIN_DEBUG_2ARG ("ICEDTEA PLUGIN: %s%s\n",
- name, function);
- }
-
- ~Trace ()
- {
- PLUGIN_DEBUG_3ARG ("ICEDTEA PLUGIN: %s%s %s\n",
- name, function, "return");
- }
-private:
- char const* name;
- char const* function;
-};
-
-// Testing macro.
-#define PLUGIN_TEST(expression, message) \
- do \
- { \
- if (!(expression)) \
- printf ("FAIL: %d: %s\n", __LINE__, \
- message); \
- } \
- while (0);
-
-#include <sys/time.h>
-#include <unistd.h>
-
-inline suseconds_t get_time_in_ms()
-{
- struct timeval tv;
- struct timezone tz;
- gettimeofday(&tv, &tz);
-
- return tv.tv_usec;
-}
-
-
-inline long get_time_in_s()
-{
- time_t t;
- return time(&t);
-}
-
-// __func__ is a variable, not a string literal, so it cannot be
-// concatenated by the preprocessor.
-#define PLUGIN_TRACE_JNIENV() Trace _trace ("JNIEnv::", __func__)
-#define PLUGIN_TRACE_FACTORY() Trace _trace ("Factory::", __func__)
-#define PLUGIN_TRACE_INSTANCE() Trace _trace ("Instance::", __func__)
-#define PLUGIN_TRACE_EVENTSINK() Trace _trace ("EventSink::", __func__)
-#define PLUGIN_TRACE_LISTENER() Trace _trace ("Listener::", __func__)
-//#define PLUGIN_TRACE_RC() Trace _trace ("ResultContainer::", __func__)
-#define PLUGIN_TRACE_RC()
-
-// Error reporting macros.
-#define PLUGIN_ERROR(message) \
- fprintf (stderr, "%s:%d: Error: %s\n", __FILE__, __LINE__, \
- message)
-
-#define PLUGIN_ERROR_TWO(first, second) \
- fprintf (stderr, "%s:%d: Error: %s: %s\n", __FILE__, __LINE__, \
- first, second)
-
-#define PLUGIN_ERROR_THREE(first, second, third) \
- fprintf (stderr, "%s:%d: Error: %s: %s: %s\n", __FILE__, \
- __LINE__, first, second, third)
-
-#define PLUGIN_CHECK_RETURN(message, result) \
- if (NS_SUCCEEDED (result)) \
- { \
- PLUGIN_DEBUG (message); \
- } \
- else \
- { \
- PLUGIN_ERROR (message); \
- return result; \
- }
-
-#define PLUGIN_CHECK(message, result) \
- if (NS_SUCCEEDED (result)) \
- { \
- PLUGIN_DEBUG (message); \
- } else \
- { \
- PLUGIN_ERROR (message); \
- }
-
-#else
-
-// Debugging macros.
-#define PLUGIN_DEBUG(message)
-#define PLUGIN_DEBUG_TWO(first, second)
-
-// Testing macros.
-#define PLUGIN_TEST(expression, message)
-#define PLUGIN_TRACE_JNIENV()
-#define PLUGIN_TRACE_FACTORY() Trace _trace ("Factory::", __func__)
-//#define PLUGIN_TRACE_FACTORY()
-#define PLUGIN_TRACE_INSTANCE()
-#define PLUGIN_TRACE_EVENTSINK()
-#define PLUGIN_TRACE_LISTENER()
-
-// Error reporting macros.
-#define PLUGIN_ERROR(message) \
- fprintf (stderr, "%s:%d: Error: %s\n", __FILE__, __LINE__, \
- message)
-
-#define PLUGIN_ERROR_TWO(first, second) \
- fprintf (stderr, "%s:%d: Error: %s: %s\n", __FILE__, __LINE__, \
- first, second)
-
-#define PLUGIN_ERROR_THREE(first, second, third) \
- fprintf (stderr, "%s:%d: Error: %s: %s: %s\n", __FILE__, \
- __LINE__, first, second, third)
-#define PLUGIN_CHECK_RETURN(message, result)
-#define PLUGIN_CHECK(message, result)
-#endif
-
-#define PLUGIN_NAME "IcedTea Java Web Browser Plugin (using " PLUGIN_VERSION ")"
-#define PLUGIN_DESCRIPTION "The " PLUGIN_NAME " executes Java applets."
-#define PLUGIN_MIME_DESC \
- "application/x-java-vm:class,jar:IcedTea;" \
- "application/x-java-applet:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.1:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.1.1:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.1.2:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.1.3:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.2:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.2.1:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.2.2:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.3:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.3.1:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.4:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.4.1:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.4.2:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.5:class,jar:IcedTea;" \
- "application/x-java-applet;version=1.6:class,jar:IcedTea;" \
- "application/x-java-applet;jpi-version=1.6.0_00:class,jar:IcedTea;" \
- "application/x-java-bean:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.1:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.1.1:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.1.2:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.1.3:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.2:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.2.1:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.2.2:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.3:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.3.1:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.4:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.4.1:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.4.2:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.5:class,jar:IcedTea;" \
- "application/x-java-bean;version=1.6:class,jar:IcedTea;" \
- "application/x-java-bean;jpi-version=1.6.0_00:class,jar:IcedTea;"
-
-#define FAILURE_MESSAGE "IcedTeaPluginFactory error: Failed to run %s." \
- " For more detail rerun \"firefox -g\" in a terminal window."
-
-// Global instance counter.
-// A global variable for reporting GLib errors. This must be free'd
-// and set to NULL after each use.
-static GError* channel_error = NULL;
-// Fully-qualified appletviewer executable.
-gchar* data_directory = NULL;
-static char* appletviewer_executable = NULL;
-static char* libjvm_so = NULL;
-
-class IcedTeaPluginFactory;
-
-static PRBool factory_created = PR_FALSE;
-static IcedTeaPluginFactory* factory = NULL;
-
-static PRBool jvm_attached = PR_FALSE;
-
-// Applet viewer input channel (needs to be static because it is used in plugin_in_pipe_callback)
-GIOChannel* in_from_appletviewer = NULL;
-
-// Callback used to monitor input pipe status.
-static gboolean plugin_in_pipe_callback (GIOChannel* source,
- GIOCondition condition,
- gpointer plugin_data);
-
-#include <prmon.h>
-#include <queue>
-#include <nsCOMPtr.h>
-#include <nsIThread.h>
-#include <nspr.h>
-
-PRMonitor *jvmMsgQueuePRMonitor;
-std::queue<nsCString> jvmMsgQueue;
-nsCOMPtr<nsIThread> processThread;
-
-// IcedTeaJNIEnv helpers.
-class JNIReference
-{
-public:
- JNIReference (PRUint32 identifier);
- ~JNIReference ();
- PRUint32 identifier;
- PRUint32 count;
-};
-
-JNIReference::JNIReference (PRUint32 identifier)
- : identifier (identifier),
- count (0)
-{
- PLUGIN_DEBUG_2ARG ("JNIReference CONSTRUCT: %d %p\n", identifier, this);
-}
-
-JNIReference::~JNIReference ()
-{
- PLUGIN_DEBUG_2ARG ("JNIReference DECONSTRUCT: %d %p\n", identifier, this);
-}
-
-class JNIID : public JNIReference
-{
-public:
- JNIID (PRUint32 identifier, char const* signature);
- ~JNIID ();
- char const* signature;
-};
-
-JNIID::JNIID (PRUint32 identifier, char const* signature)
- : JNIReference (identifier),
- signature (strdup (signature))
-{
- PLUGIN_DEBUG_2ARG ("JNIID CONSTRUCT: %d %p\n", identifier, this);
-}
-
-JNIID::~JNIID ()
-{
- PLUGIN_DEBUG_2ARG ("JNIID DECONSTRUCT: %d %p\n", identifier, this);
-}
-
-char const* TYPES[10] = { "Object",
- "boolean",
- "byte",
- "char",
- "short",
- "int",
- "long",
- "float",
- "double",
- "void" };
-
-
-// FIXME: create index from security context.
-#define MESSAGE_CREATE() \
- nsCString message ("context "); \
- message.AppendInt (0); \
More information about the distro-pkg-dev
mailing list