mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
bug=201164 Crash when java applet returns a number as a string to a javascript, and the script modifyes the number.
r/sr=brendan@mozilla.org sr=beard@netscape.com
This commit is contained in:
parent
9e50b7b363
commit
4bed3d7dff
@ -760,7 +760,17 @@ jsj_ConvertJavaObjectToJSNumber(JSContext *cx, JNIEnv *jEnv,
|
||||
return jsj_ConvertJavaObjectToJSString(cx, jEnv, class_descriptor,
|
||||
java_obj, vp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Sun Java-Plugin team work around bug to be fixed in JRE1.5, where GetMethodID
|
||||
* called with a non-existent method name returns a non-null result.
|
||||
* See Mozilla bug 201164.
|
||||
*/
|
||||
if ((*jEnv)->ExceptionOccurred(jEnv)) {
|
||||
jsj_UnexpectedJavaError(cx, jEnv, "No doubleValue() method for class %s!",
|
||||
class_descriptor->name);
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
d = (*jEnv)->CallDoubleMethod(jEnv, java_obj, doubleValue);
|
||||
if ((*jEnv)->ExceptionOccurred(jEnv)) {
|
||||
jsj_UnexpectedJavaError(cx, jEnv, "doubleValue() method failed");
|
||||
|
Loading…
Reference in New Issue
Block a user