Merging JAVADEV_RTM_20001102 into Trunk
_Ashu git-svn-id: svn://10.0.0.236/trunk@91051 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -46,11 +46,11 @@ const char *gSupportedListenerInterfaces[] = {
|
||||
|
||||
void util_PostEvent(WebShellInitContext * initContext, PLEvent * event)
|
||||
{
|
||||
PL_ENTER_EVENT_QUEUE_MONITOR(initContext->actionQueue);
|
||||
PL_ENTER_EVENT_QUEUE_MONITOR(gActionQueue);
|
||||
|
||||
::PL_PostEvent(initContext->actionQueue, event);
|
||||
::PL_PostEvent(gActionQueue, event);
|
||||
|
||||
PL_EXIT_EVENT_QUEUE_MONITOR(initContext->actionQueue);
|
||||
PL_EXIT_EVENT_QUEUE_MONITOR(gActionQueue);
|
||||
} // PostEvent()
|
||||
|
||||
|
||||
@@ -58,15 +58,54 @@ void *util_PostSynchronousEvent(WebShellInitContext * initContext, PLEvent * eve
|
||||
{
|
||||
void * voidResult = nsnull;
|
||||
|
||||
PL_ENTER_EVENT_QUEUE_MONITOR(initContext->actionQueue);
|
||||
PL_ENTER_EVENT_QUEUE_MONITOR(gActionQueue);
|
||||
|
||||
voidResult = ::PL_PostSynchronousEvent(initContext->actionQueue, event);
|
||||
voidResult = ::PL_PostSynchronousEvent(gActionQueue, event);
|
||||
|
||||
PL_EXIT_EVENT_QUEUE_MONITOR(initContext->actionQueue);
|
||||
PL_EXIT_EVENT_QUEUE_MONITOR(gActionQueue);
|
||||
|
||||
return voidResult;
|
||||
} // PostSynchronousEvent()
|
||||
|
||||
nsresult util_CreateJstringsFromUnichars(wsStringStruct *strings,
|
||||
PRInt32 arrayLen)
|
||||
{
|
||||
PR_ASSERT(strings);
|
||||
int i = 0;
|
||||
nsAutoString autoStr;
|
||||
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION);
|
||||
|
||||
for (i = 0; i < arrayLen; i++) {
|
||||
autoStr = strings[i].uniStr;
|
||||
strings[i].jStr = nsnull;
|
||||
if (autoStr.GetUnicode()) {
|
||||
strings[i].jStr = ::util_NewString(env, (const jchar *)
|
||||
autoStr.GetUnicode(),
|
||||
autoStr.Length());
|
||||
if (nsnull == strings[i].jStr) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult util_DeleteJstringsFromUnichars(wsStringStruct *strings,
|
||||
PRInt32 arrayLen)
|
||||
{
|
||||
PR_ASSERT(strings);
|
||||
int i = 0;
|
||||
JNIEnv *env = (JNIEnv *) JNU_GetEnv(gVm, JNI_VERSION);
|
||||
|
||||
for (i = 0; i < arrayLen; i++) {
|
||||
if (nsnull != strings[i].jStr) {
|
||||
::util_DeleteString(env, strings[i].jStr);
|
||||
strings[i].jStr = nsnull;
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#ifdef XP_UNIX
|
||||
jint util_GetGTKWinPtrFromCanvas(JNIEnv *env, jobject browserControlCanvas)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user