diff --git a/mozilla/plugin/oji/MRJCarbon/plugin/Source/LiveConnectNativeMethods.cpp b/mozilla/plugin/oji/MRJCarbon/plugin/Source/LiveConnectNativeMethods.cpp index 87dda347fd9..3fc967009f8 100644 --- a/mozilla/plugin/oji/MRJCarbon/plugin/Source/LiveConnectNativeMethods.cpp +++ b/mozilla/plugin/oji/MRJCarbon/plugin/Source/LiveConnectNativeMethods.cpp @@ -120,10 +120,19 @@ nsresult InitLiveConnectSupport(MRJPlugin* jvmPlugin) env->DeleteLocalRef(classJSObject); netscape_javascript_JSObject_JSObject = env->GetMethodID(netscape_javascript_JSObject, "", "(I)V"); + if (env->ExceptionCheck()) { + env->ExceptionClear(); + result = NS_ERROR_FAILURE; + } + netscape_javascript_JSObject_internal = env->GetFieldID(netscape_javascript_JSObject, "internal", "I"); + if (env->ExceptionCheck()) { + env->ExceptionClear(); + result = NS_ERROR_FAILURE; + } env->RegisterNatives(netscape_javascript_JSObject, nativeMethods, sizeof(nativeMethods) / sizeof(JNINativeMethod)); - if (env->ExceptionOccurred()) { + if (env->ExceptionCheck()) { env->ExceptionClear(); result = NS_ERROR_FAILURE; }