Bug 619827 - throw from AudioTrack constructor kills fennec, r=kinetic,mwu a=blocking-fennec

This commit is contained in:
Doug Turner 2010-12-20 00:15:48 -08:00
parent 064a48a59c
commit 45e5655e9c

View File

@ -220,6 +220,15 @@ sa_stream_open(sa_stream_t *s) {
s->bufferSize,
MODE_STREAM);
jthrowable exception = (*jenv)->ExceptionOccurred(jenv);
if (exception) {
(*jenv)->ExceptionDescribe(jenv);
(*jenv)->ExceptionClear(jenv);
(*jenv)->DeleteGlobalRef(jenv, s->at_class);
(*jenv)->PopLocalFrame(jenv, NULL);
return SA_ERROR_INVALID;
}
if (!obj) {
(*jenv)->DeleteGlobalRef(jenv, s->at_class);
(*jenv)->PopLocalFrame(jenv, NULL);