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:
akhil.arora%sun.com
1999-10-30 02:14:28 +00:00
parent 85fd5baad4
commit 4e94fff191
7 changed files with 246 additions and 153 deletions

View File

@@ -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;