mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-05 15:59:45 +00:00
Warning fixes. (Found one semantic problem in nsCLiveconnect.cpp)
r=mozbot
This commit is contained in:
parent
cb324c279e
commit
430c33bc7f
@ -421,7 +421,8 @@ JSObjectOps JavaArray_ops = {
|
||||
NULL, /* call */
|
||||
NULL, /* construct */
|
||||
NULL, /* xdrObject */
|
||||
NULL /* hasInstance */
|
||||
NULL, /* hasInstance */
|
||||
{0, 0}, /* spare */
|
||||
};
|
||||
|
||||
static JSObjectOps *
|
||||
@ -434,7 +435,15 @@ JSClass JavaArray_class = {
|
||||
"JavaArray", JSCLASS_HAS_PRIVATE,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, JavaObject_convert, JavaObject_finalize,
|
||||
|
||||
/* Optionally non-null members start here. */
|
||||
JavaArray_getObjectOps,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
{0, 0},
|
||||
};
|
||||
|
||||
extern JS_IMPORT_DATA(JSObjectOps) js_ObjectOps;
|
||||
|
@ -559,6 +559,7 @@ JSObjectOps JavaClass_ops = {
|
||||
jsj_JavaConstructorWrapper, /* construct */
|
||||
NULL, /* xdrObject */
|
||||
JavaClass_hasInstance, /* hasInstance */
|
||||
{0, 0},
|
||||
};
|
||||
|
||||
static JSObjectOps *
|
||||
@ -571,7 +572,15 @@ JSClass JavaClass_class = {
|
||||
"JavaClass", JSCLASS_HAS_PRIVATE,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, JavaClass_convert, JavaClass_finalize,
|
||||
JavaClass_getObjectOps
|
||||
|
||||
/* Optionally non-null members start here. */
|
||||
JavaClass_getObjectOps,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
{0, 0},
|
||||
};
|
||||
|
||||
static JSObject *
|
||||
|
@ -158,9 +158,14 @@ JSClass JavaMember_class = {
|
||||
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
|
||||
JS_EnumerateStub, JS_ResolveStub,
|
||||
JavaMember_convert, JavaMember_finalize,
|
||||
|
||||
NULL, /* getObjectOps */
|
||||
NULL, /* checkAccess */
|
||||
JavaMember_Call
|
||||
JavaMember_Call,
|
||||
NULL, /* construct */
|
||||
NULL, /* xdrObject */
|
||||
NULL, /* hasInstance */
|
||||
{0, 0}, /* spare */
|
||||
};
|
||||
|
||||
JSBool
|
||||
|
@ -895,6 +895,7 @@ JSObjectOps JavaObject_ops = {
|
||||
NULL, /* construct */
|
||||
NULL, /* xdrObject */
|
||||
NULL, /* hasInstance */
|
||||
{0, 0}, /* spare */
|
||||
};
|
||||
|
||||
static JSObjectOps *
|
||||
@ -907,7 +908,15 @@ JSClass JavaObject_class = {
|
||||
"JavaObject", JSCLASS_HAS_PRIVATE,
|
||||
NULL, NULL, NULL, NULL,
|
||||
NULL, NULL, JavaObject_convert, JavaObject_finalize,
|
||||
|
||||
/* Optionally non-null members start here. */
|
||||
JavaObject_getObjectOps,
|
||||
NULL, /* checkAccess */
|
||||
NULL, /* call */
|
||||
NULL, /* construct */
|
||||
NULL, /* xdrObject */
|
||||
NULL, /* hasInstance */
|
||||
{0, 0}, /* spare */
|
||||
};
|
||||
|
||||
extern JS_IMPORT_DATA(JSObjectOps) js_ObjectOps;
|
||||
|
@ -215,10 +215,10 @@ JavaPackage_resolve(JSContext *cx, JSObject *obj, jsval id)
|
||||
* system packages to be created.
|
||||
*/
|
||||
if (JS_InstanceOf(cx, obj, &JavaPackage_class, NULL)) {
|
||||
JavaPackage_Private *package;
|
||||
JavaPackage_Private *current_package;
|
||||
|
||||
package = JS_GetPrivate(cx, obj);
|
||||
if (package->flags & PKG_SYSTEM) {
|
||||
current_package = JS_GetPrivate(cx, obj);
|
||||
if (current_package->flags & PKG_SYSTEM) {
|
||||
char *msg, *cp;
|
||||
msg = JS_strdup(cx, newPath);
|
||||
|
||||
@ -327,7 +327,16 @@ JSClass JavaPackage_class = {
|
||||
"JavaPackage", JSCLASS_HAS_PRIVATE,
|
||||
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JavaPackage_setProperty,
|
||||
JS_EnumerateStub, JavaPackage_resolve,
|
||||
JavaPackage_convert, JavaPackage_finalize
|
||||
JavaPackage_convert, JavaPackage_finalize,
|
||||
|
||||
/* Optionally non-null members start here. */
|
||||
NULL, /* getObjectOps */
|
||||
NULL, /* checkAccess */
|
||||
NULL, /* call */
|
||||
NULL, /* construct */
|
||||
NULL, /* xdrObject */
|
||||
NULL, /* hasInstance */
|
||||
{0, 0}, /* spare */
|
||||
};
|
||||
|
||||
JavaPackageDef
|
||||
@ -488,8 +497,8 @@ JavaPackage_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
|
||||
}
|
||||
|
||||
static JSFunctionSpec JavaPackage_methods[] = {
|
||||
{"toString", JavaPackage_toString, 0},
|
||||
{0}
|
||||
{"toString", JavaPackage_toString, 0, 0, 0},
|
||||
{0, 0, 0, 0, 0},
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -259,7 +259,8 @@ vreport_java_error(JSContext *cx, JNIEnv *jEnv, const char *format, va_list ap)
|
||||
(*jEnv)->GetIntField(jEnv, java_exception,
|
||||
njJSException_wrappedExceptionType);
|
||||
|
||||
if (wrapped_exception_type != JSTYPE_EMPTY) {
|
||||
/* (int) to suppress warning */
|
||||
if ((int)wrapped_exception_type != JSTYPE_EMPTY) {
|
||||
java_obj =
|
||||
(*jEnv)->GetObjectField(jEnv, java_exception,
|
||||
njJSException_wrappedException);
|
||||
|
@ -501,8 +501,8 @@ nsCLiveconnect::GetWindow(JNIEnv *jEnv, void *java_applet_obj, void* principals
|
||||
JSErrorReporter saved_state = NULL;
|
||||
jobject java_obj = NULL;
|
||||
JSJavaThreadState *jsj_env = NULL;
|
||||
int dummy_cost = 0;
|
||||
JSBool dummy_bool = PR_FALSE;
|
||||
// int dummy_cost = 0; // unused
|
||||
// JSBool dummy_bool = PR_FALSE; // unused
|
||||
JSObjectHandle *handle = NULL;
|
||||
|
||||
jsj_env = jsj_enter_js(jEnv, java_applet_obj, NULL, &cx, NULL, &saved_state, principalsArray, numPrincipals, pNSISecurityContext);
|
||||
@ -596,7 +596,7 @@ nsCLiveconnect::ToString(JNIEnv *jEnv, jsobject obj, jstring *pjstring)
|
||||
result = jEnv->NewStringUTF("*JavaObject*");
|
||||
|
||||
if (!jsj_exit_js(cx, jsj_env, saved_state))
|
||||
return NULL;
|
||||
return NS_ERROR_FAILURE;
|
||||
*pjstring = result;
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user