r=akhil.arora@sun.com, fix by Denis Sharypov <sdv@sparc.spb.su>
13271: the wrong method was being called in ProcessingInstructionImpl.cpp 13338: handle null input arguments gracefully without crashing git-svn-id: svn://10.0.0.236/trunk@52307 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -143,20 +143,26 @@ JNIEXPORT jboolean JNICALL Java_org_mozilla_dom_DOMImplementationImpl_hasFeature
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
const char* feature = NULL;
|
||||
jboolean iscopy = JNI_FALSE;
|
||||
const char* feature = env->GetStringUTFChars(jfeature, &iscopy);
|
||||
if (!feature) {
|
||||
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
|
||||
("DOMImplementation.hasFeature: GetStringUTFChars feature failed\n"));
|
||||
return JNI_FALSE;
|
||||
if (jfeature) {
|
||||
feature = env->GetStringUTFChars(jfeature, &iscopy);
|
||||
if (!feature) {
|
||||
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
|
||||
("DOMImplementation.hasFeature: GetStringUTFChars feature failed\n"));
|
||||
return JNI_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
const char* version = NULL;
|
||||
jboolean iscopy2 = JNI_FALSE;
|
||||
const char* version = env->GetStringUTFChars(jversion, &iscopy2);
|
||||
if (!version) {
|
||||
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
|
||||
("DOMImplementation.hasFeature: GetStringUTFChars version failed\n"));
|
||||
return JNI_FALSE;
|
||||
if (jversion) {
|
||||
version = env->GetStringUTFChars(jversion, &iscopy2);
|
||||
if (!version) {
|
||||
PR_LOG(JavaDOMGlobals::log, PR_LOG_ERROR,
|
||||
("DOMImplementation.hasFeature: GetStringUTFChars version failed\n"));
|
||||
return JNI_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
PRBool ret = PR_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user