Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Issue 10996063: Android: adds Get(Static)MethodIDOrNULL. (Closed)

Created:
8 years, 2 months ago by bulach
Modified:
8 years, 2 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, erikwright+watch_chromium.org, browser-components-watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Android: adds Get(Static)MethodIDOrNULL. When generating JNI bindings for system classes, we try to get the ids for methods based in the .class file in the SDK. However, this may trigger run-time errors when trying to run on an older SDK. For these system classes, the JNI generator will bind using the "OrNULL" variation. BUG=152987 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=159769

Patch Set 1 #

Patch Set 2 : OrNULL #

Total comments: 4

Patch Set 3 : Comments #

Total comments: 9

Patch Set 4 : Sami/Joth comments #

Total comments: 12

Patch Set 5 : Nyquist comments / joth's template #

Total comments: 2

Patch Set 6 : CHECK consistency #

Total comments: 4

Patch Set 7 : Removes spurious ClearException #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -29 lines) Patch
M base/android/jni_android.h View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M base/android/jni_android.cc View 1 2 3 4 5 6 6 chunks +53 lines, -17 lines 0 comments Download
M base/android/jni_generator/jni_generator.py View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M base/android/jni_generator/jni_generator_tests.py View 1 2 11 chunks +12 lines, -10 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
bulach
8 years, 2 months ago (2012-10-01 09:46:18 UTC) #1
Sami
http://codereview.chromium.org/10996063/diff/2001/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/2001/base/android/jni_android.cc#newcode181 base/android/jni_android.cc:181: ClearException(env); This causes some log spam which could be ...
8 years, 2 months ago (2012-10-01 11:32:15 UTC) #2
bulach
thanks sami! comments addressed, another look please? http://codereview.chromium.org/10996063/diff/2001/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/2001/base/android/jni_android.cc#newcode181 base/android/jni_android.cc:181: ClearException(env); On ...
8 years, 2 months ago (2012-10-01 15:08:36 UTC) #3
Sami
lgtm, thanks for refactoring. http://codereview.chromium.org/10996063/diff/3009/chrome/browser/history/android/sqlite_cursor.cc File chrome/browser/history/android/sqlite_cursor.cc (right): http://codereview.chromium.org/10996063/diff/3009/chrome/browser/history/android/sqlite_cursor.cc#newcode19 chrome/browser/history/android/sqlite_cursor.cc:19: using base::android::GetMethodIDOrNULL; Looks like NULL ...
8 years, 2 months ago (2012-10-01 15:45:59 UTC) #4
joth
http://codereview.chromium.org/10996063/diff/3009/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/3009/base/android/jni_android.cc#newcode115 base/android/jni_android.cc:115: ExceptionCheck exception_check) { for bonus points these enums could ...
8 years, 2 months ago (2012-10-01 16:15:27 UTC) #5
bulach
8 years, 2 months ago (2012-10-01 17:07:53 UTC) #6
bulach
http://codereview.chromium.org/10996063/diff/3009/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/3009/base/android/jni_android.cc#newcode115 base/android/jni_android.cc:115: ExceptionCheck exception_check) { On 2012/10/01 16:15:27, joth wrote: > ...
8 years, 2 months ago (2012-10-01 17:25:00 UTC) #7
joth
lgtm http://codereview.chromium.org/10996063/diff/3009/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/3009/base/android/jni_android.cc#newcode115 base/android/jni_android.cc:115: ExceptionCheck exception_check) { On 2012/10/01 17:25:00, bulach wrote: ...
8 years, 2 months ago (2012-10-01 17:57:18 UTC) #8
nyquist
This also affects crbug/153024. See downstream: https://gerrit-int.chromium.org/#/c/26330/ http://codereview.chromium.org/10996063/diff/12002/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/12002/base/android/jni_android.cc#newcode106 base/android/jni_android.cc:106: EXCEPTIIONCHECK_YES, Remove ...
8 years, 2 months ago (2012-10-02 02:59:17 UTC) #9
bulach
thanks tommy, joth! I addressed all your comments in the latest patch, ptal! http://codereview.chromium.org/10996063/diff/12002/base/android/jni_android.cc File ...
8 years, 2 months ago (2012-10-02 08:19:22 UTC) #10
joth
lgtm % one consistency suggestion... http://codereview.chromium.org/10996063/diff/21001/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/21001/base/android/jni_android.cc#newcode119 base/android/jni_android.cc:119: CHECK(method_id || base::android::ClearException(env)) << ...
8 years, 2 months ago (2012-10-02 17:12:56 UTC) #11
bulach
thanks joth! addressed.. tommy: I'll put these through the trybots now, if you're happy with ...
8 years, 2 months ago (2012-10-02 17:25:40 UTC) #12
joth
lgtm (one benign error, can fix in a follow up...) http://codereview.chromium.org/10996063/diff/21003/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/21003/base/android/jni_android.cc#newcode256 ...
8 years, 2 months ago (2012-10-02 17:51:40 UTC) #13
bulach
all done, thanks joth! http://codereview.chromium.org/10996063/diff/21003/base/android/jni_android.cc File base/android/jni_android.cc (right): http://codereview.chromium.org/10996063/diff/21003/base/android/jni_android.cc#newcode256 base/android/jni_android.cc:256: bool error = ClearException(env); On ...
8 years, 2 months ago (2012-10-02 18:02:26 UTC) #14
nyquist
lgtm
8 years, 2 months ago (2012-10-02 18:07:09 UTC) #15
joth
lgtm
8 years, 2 months ago (2012-10-02 18:07:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/10996063/16003
8 years, 2 months ago (2012-10-02 18:07:28 UTC) #17
commit-bot: I haz the power
8 years, 2 months ago (2012-10-02 21:13:57 UTC) #18
Change committed as 159769

Powered by Google App Engine
This is Rietveld 408576698