New issue
Advanced search Search tips

Issue 713292 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Treat missing RegisterJNI calls as compile-time errors

Project Member Reported by ntfschr@chromium.org, Apr 19 2017

Issue description

We should investigate if omitted RegisterJNI calls can be treated as compile-time errors. Failing that, we should at least check these calls on the CQ.

Missing RegisterJNI calls will cause compile errors for any functions which are actually tested. Unfortunately, there's always the possibility that JNI calls won't be tested on the CQ (perhaps if the classes are not easily testable). However, missing JNI registration can cause a crash on startup for chrome, so it's important to catch mistakes like these.

See go/chromepostmortem340 (internal only).

CC'ing Torne, in case he has any ideas off the top of his head on how to achieve this (although last we talked, we concluded this would be very difficult to actually fix).
 

Comment 1 by torne@chromium.org, Apr 19 2017

Just generating this code automatically as  issue 683256  proposes is probably the best solution as that will eliminate people making mistakes entirely.

I can't think of any way to check this other than running tests which actually call every JNI function.
Thanks for the feedback. That bug seems like the most reasonable fix. If that's acceptable from a postmortem standpoint, I'll close this in favor of that bug.

Comment 3 by torne@chromium.org, Apr 20 2017

Yeah, I think that's fine; I really can't think of a way to verify this automatically, and generating the boilerplate is definitely going to be better than trying to check that manually written boilerplate is correct.
Status: WontFix (was: Assigned)
SGTM. Closing this in favor of crbug/683256

Sign in to add a comment