From 39accdfa4bd49502133878c670fdd862b2ddb4d8 Mon Sep 17 00:00:00 2001 From: fur Date: Fri, 24 Apr 1998 06:26:57 +0000 Subject: [PATCH] Temporarily disable charSet info so we can compile git-svn-id: svn://10.0.0.236/trunk@589 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/jsj/jsStubs.c | 59 +++++++++++++++++++++++++-------- mozilla/js/jsj/jsjava.c | 42 +++++++++++++++++------ mozilla/lib/libmocha/lm_taint.c | 8 +++-- 3 files changed, 83 insertions(+), 26 deletions(-) diff --git a/mozilla/js/jsj/jsStubs.c b/mozilla/js/jsj/jsStubs.c index a0a7227c08a..5837283d6a6 100644 --- a/mozilla/js/jsj/jsStubs.c +++ b/mozilla/js/jsj/jsStubs.c @@ -166,8 +166,13 @@ native_netscape_javascript_JSObject_getMember( if (! name || ! (cstr = JRI_GetStringPlatformChars(env, name, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength))) { + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ + /* FIXME this should be an error of some sort */ js_throwJSException(env, "illegal member name"); member = NULL; @@ -242,8 +247,13 @@ native_netscape_javascript_JSObject_setMember( if (! name || ! (cstr = JRI_GetStringPlatformChars(env, name, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength))) { + NULL, 0) { + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ + js_throwJSException(env, "illegal member name"); goto do_exit; } @@ -309,8 +319,12 @@ native_netscape_javascript_JSObject_removeMember( #ifdef JAVA if (! name || ! (cstr = JRI_GetStringPlatformChars(env, name, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength))) { + NULL, 0) { + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ /* FIXME this should be an error of some sort */ js_throwJSException(env, "illegal member name"); goto do_exit; @@ -354,8 +368,12 @@ native_netscape_javascript_JSObject_call( if (! method || ! (cstr = JRI_GetStringPlatformChars(env, method, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength))) { + NULL, 0) { + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ /* FIXME this should be an error of some sort */ js_throwJSException(env, "illegal member name"); ret = NULL; @@ -424,8 +442,12 @@ native_netscape_javascript_JSObject_eval( if (! s || ! (cstr = JRI_GetStringPlatformChars(env, s, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength))) { + NULL, 0) { + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength) { + */ /* FIXME this should be an error of some sort */ js_throwJSException(env, "illegal eval string"); ret = NULL; @@ -507,15 +529,24 @@ native_netscape_javascript_JSObject_toString( ret = JRI_NewStringPlatform(env, (const jbyte *) cstr, (jint) JS_GetStringLength(jsstr), - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ + } else { /* FIXME could grab the clazz name from the JSObject */ ret = JRI_NewStringPlatform(env, (const jbyte *) "*JSObject*", (jint) strlen("*JSObject*"), - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ } #endif diff --git a/mozilla/js/jsj/jsjava.c b/mozilla/js/jsj/jsjava.c index 9b16db5ee73..2bb1b7212b5 100644 --- a/mozilla/js/jsj/jsjava.c +++ b/mozilla/js/jsj/jsjava.c @@ -1200,8 +1200,12 @@ js_isSubclassOf(JSContext *cx, ClassClass *cb1, ClassClass *cb2) message = (char *) JRI_GetStringPlatformChars((JRIEnv *) ee, (struct java_lang_String *) hdetail, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ PR_LOG(MojaSrc, error, ("exception in is_subclass_of %s (\"%s\")", @@ -1417,8 +1421,12 @@ js_convertJSValueToJObject(HObject **objp, JSContext *cx, JRI_NewStringPlatform((JRIEnv *) ee, (const jbyte *) JS_GetStringBytes(str), (jint) JS_GetStringLength(str), - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ } return JS_TRUE; } @@ -2104,8 +2112,13 @@ js_convertJObjectToJSString(JSContext *cx, HObject *ho, JSBool isClass, cstr = (char *) JRI_GetStringPlatformChars((JRIEnv *) ee, (struct java_lang_String *) hstr, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ + if (cstr) cstr = strdup(cstr); } @@ -3436,8 +3449,13 @@ js_JExceptionToJSError(JSContext *cx, ExecEnv *ee) message = (char *) JRI_GetStringPlatformChars((JRIEnv *) ee, (struct java_lang_String *) hdetail, - (const jbyte *) cx->charSetName, - (jint) cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ + PR_LOG(MojaSrc, debug, ("m-j converted exception %s, \"%s\" to error cx=0x%x ee=0x%x", cbName(cb), message, cx, ee)); @@ -3643,8 +3661,12 @@ js_FindJavaClass_stub(void *d) message = (char *) JRI_GetStringPlatformChars((JRIEnv *) ee, (struct java_lang_String *) hdetail, - (const jbyte *) data->cx->charSetName, - (jint) data->cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ PR_LOG(MojaSrc, debug, ("exception in is_subclass_of %s (\"%s\")", diff --git a/mozilla/lib/libmocha/lm_taint.c b/mozilla/lib/libmocha/lm_taint.c index 605a302af44..9998f759c42 100644 --- a/mozilla/lib/libmocha/lm_taint.c +++ b/mozilla/lib/libmocha/lm_taint.c @@ -793,8 +793,12 @@ printPrincipalsToConsole(JSContext *cx, JSPrincipals *principals) javaString = netscape_security_Principal_getVendor(env, principal); if (javaString) { const char *s = JRI_GetStringPlatformChars(env, javaString, - (const jbyte *)cx->charSetName, - (jint)cx->charSetNameLength); + NULL, 0); + + /* XXX - temporarily replace arguments so we can compile + (const jbyte *) cx->charSetName, + (jint) cx->charSetNameLength); + */ if (s == NULL) { JS_ReportOutOfMemory(cx); return;