Treat missing RegisterJNI calls as compile-time errors |
||
Issue descriptionWe 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).
,
Apr 19 2017
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.
,
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.
,
Apr 20 2017
SGTM. Closing this in favor of crbug/683256 |
||
►
Sign in to add a comment |
||
Comment 1 by torne@chromium.org
, Apr 19 2017