Created attachment 621634 [details] [diff] [review] Patch :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*?
Created attachment 621650 [details] [diff] [review] Patch v2 Sounds reasonable to me. We still need to do null checks on it before using it though.
Try was green: https://tbpl.mozilla.org/?tree=Try&rev=cc9d881fee80 Landed on inbound: https://hg.mozilla.org/integration/mozilla-inbound/rev/3bc06857dcd2
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