20208
Add exception trowing in case peer object is not existing. (Stream closed, not created, etc) git-svn-id: svn://10.0.0.236/trunk@55107 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -67,6 +67,14 @@ JNIEXPORT jint JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInputStream_nativ
|
||||
if (env->ExceptionOccurred()) {
|
||||
return retval;
|
||||
}
|
||||
if (!input) {
|
||||
jclass ex = env->FindClass("java/io/IOException");
|
||||
if (!ex) {
|
||||
return retval;
|
||||
}
|
||||
env->ThrowNew(ex,"Stream was closed");
|
||||
return retval;
|
||||
}
|
||||
jbyte * bufElems = (jbyte*) malloc(sizeof(jbyte)*len);
|
||||
if (!bufElems) {
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user