Closed Bug 752539 Opened 7 years ago Closed 7 years ago
Some of the Auto
Local JNIFrame code usage could be more robust
:gcp pointed out that functions like AndroidGeckoLayerClient::ActivateProgram(JNIEnv *env) don't obviously check for exceptions after the JNI invocation; the caller is expected to do this. In order to make the code more robust it is better to pass in the AutoLocalJNIFrame to these functions and do the exception check there rather than relying on the caller to do it. The new behaviour is also consistent with some of the other functions like AndroidGeckoSurfaceView::GetSoftwareDrawBitmap. This change is a follow-up to bug 748531 and contains no actual functional changes, just code robustification.
Comment on attachment 621634 [details] [diff] [review] Patch how about adding a GetEnv() function to AutoLocalJNIFrame and replacing the JNIEnv* arguments to these functions with a AutoLocalJNIFrame*?
Sounds reasonable to me. We still need to do null checks on it before using it though.
Attachment #621650 - Flags: review?(blassey.bugs) → review+
Try was green: https://tbpl.mozilla.org/?tree=Try&rev=cc9d881fee80 Landed on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/3bc06857dcd2
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment on attachment 621650 [details] [diff] [review] Patch v2 [Approval Request Comment] Regression caused by (bug #): User impact if declined: none; future patches may not apply cleanly Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): android-only, low risk String changes made by this patch: none
Attachment #621650 - Flags: approval-mozilla-aurora?
Attachment #621650 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.