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
This commit is contained in:
idk%eng.sun.com
2000-01-18 02:53:58 +00:00
parent 46fcdc0f40
commit 5633d0bbfb
18 changed files with 259 additions and 22 deletions

View File

@@ -37,15 +37,20 @@
#include "PlugletViewMotif.h"
#include "PlugletEngine.h"
#include "PlugletLog.h"
jclass PlugletViewMotif::clazz = NULL;
jmethodID PlugletViewMotif::initMID = NULL;
PlugletViewMotif::PlugletViewMotif() {
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletViewMotif.Constructor this=%p\n",this));
frame = NULL;
WindowID = 0;
}
void PlugletViewMotif::Initialize() {
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletViewMotif.Initialize\n"));
JNIEnv *env = PlugletEngine::GetJNIEnv();
clazz = env->FindClass("sun/awt/motif/MEmbeddedFrame");
if (!clazz) {
@@ -70,7 +75,8 @@ extern jobject awt_lock;
extern Display *awt_display;
PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
printf("--PlugletViewMotif::SetWindow \n");
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletViewMotif.SetWindow this=%p\n",this));
JNIEnv *env = PlugletEngine::GetJNIEnv();
if(!clazz) {
Initialize();
@@ -81,7 +87,8 @@ PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
if (!win
|| !win->window) {
if (win && !win->window) {
printf("--PlugletViewMotif win->window = NULL. We have a bug in plugin module \n");
PR_LOG(PlugletLog::log, PR_LOG_DEBUG,
("PlugletViewMotif.SetWindow win->window = NULL. We have a bug in plugin module. this=%p\n",this));
}
if (frame) {
env->DeleteGlobalRef(frame);
@@ -145,9 +152,7 @@ PRBool PlugletViewMotif::SetWindow(nsPluginWindow* win) {
}
}
printf("--before new frame\n");
frame = env->NewObject(clazz,initMID,(jlong)w);
printf("--after new frame\n");
if(frame) {
frame = env->NewGlobalRef(frame);
if (env->ExceptionOccurred()) {