зеркало из https://github.com/mozilla/pjs.git
Tweaked error messages and comments.
This commit is contained in:
Родитель
8425419f94
Коммит
3c8f508577
|
@ -56,7 +56,7 @@ report_java_initialization_error(JNIEnv *jEnv, const char *js_error_msg)
|
|||
(*jEnv)->ExceptionClear(jEnv);
|
||||
}
|
||||
|
||||
if (java_error_msg) {
|
||||
if (java_error_msg) {
|
||||
error_msg = PR_smprintf("initialization error: %s (%s)\n",
|
||||
js_error_msg, java_error_msg);
|
||||
free((void*)java_error_msg);
|
||||
|
@ -70,7 +70,7 @@ report_java_initialization_error(JNIEnv *jEnv, const char *js_error_msg)
|
|||
|
||||
/*
|
||||
* Opaque JVM handles to Java classes and methods required for Java reflection.
|
||||
* These are computed and cached at initialization.
|
||||
* These are computed and cached during initialization.
|
||||
*/
|
||||
|
||||
jclass jlObject; /* java.lang.Object */
|
||||
|
@ -422,7 +422,7 @@ JSJ_InitJSContext(JSContext *cx, JSObject *global_obj,
|
|||
return JS_TRUE;
|
||||
}
|
||||
|
||||
/* Obtain a reference to a Java class */
|
||||
/* Eliminate a reference to a Java class */
|
||||
#define UNLOAD_CLASS(qualified_name, class) \
|
||||
if (class) { \
|
||||
(*jENV)->DeleteGlobalRef(jENV, class); \
|
||||
|
|
|
@ -268,7 +268,7 @@ JavaClass_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
|
|||
JSPropertyOp getter, JSPropertyOp setter,
|
||||
uintN attrs, JSProperty **propp)
|
||||
{
|
||||
JS_ReportError(cx, "Properties of JavaClass objects may not be deleted");
|
||||
JS_ReportError(cx, "Cannot define a new property in a JavaClass");
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ JavaObject_defineProperty(JSContext *cx, JSObject *obj, jsid id, jsval value,
|
|||
JSPropertyOp getter, JSPropertyOp setter,
|
||||
uintN attrs, JSProperty **propp)
|
||||
{
|
||||
JS_ReportError(cx, "Properties of JavaObject objects may not be deleted");
|
||||
JS_ReportError(cx, "Cannot define a new property in a JavaObject");
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,8 +103,7 @@ JavaPackage_setProperty(JSContext *cx, JSObject *obj, jsval slot, jsval *vp)
|
|||
"JavaPackage prototype object");
|
||||
return JS_FALSE;
|
||||
}
|
||||
JS_ReportError(cx, "You may not add properties to %s, "
|
||||
"as it is not a JavaScript object", package->path);
|
||||
JS_ReportError(cx, "You may not add properties to a JavaPackage object");
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -104,9 +104,9 @@ typedef struct JSJCallbacks {
|
|||
/*===========================================================================*/
|
||||
|
||||
/* A flag that denotes that a Java package has no sub-packages other than those
|
||||
explicitly pre-defined at the time of JSContext initialization. An access
|
||||
explicitly pre-defined at the time of initialization. An access
|
||||
to a simple name within such a package, therefore, must either correspond to
|
||||
one of these explicitly named sub-packages or to a class within this
|
||||
one of these explicitly pre-defined sub-packages or to a class within this
|
||||
package. It is reasonable for LiveConnect to signal an error if a simple
|
||||
name does not comply with these criteria. */
|
||||
#define PKG_SYSTEM 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче