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

Issue 1509373004: Pass method parameters as JavaParamRef in chrome/browser (part 2). (Closed)

Created:
5 years ago by Torne
Modified:
5 years ago
CC:
chromium-reviews, tim+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org, zea+watch_chromium.org, pvalenzuela+watch_chromium.org, rouslan+autofill_chromium.org, maxbogue+watch_chromium.org, browser-components-watch_chromium.org, jdonnelly+autofillwatch_chromium.org, bondd+autofillwatch_chromium.org, plaree+watch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass method parameters as JavaParamRef in chrome/browser (part 2). Pass all object parameters to JNI methods in JavaParamRef<> wrappers. This matches previous changes made to do this for JNI non-method functions. BUG=506850 Committed: https://crrev.com/0a4a3ab13de0876e43ca92cb6e7b4fb66a5b70d1 Cr-Commit-Position: refs/heads/master@{#364435}

Patch Set 1 #

Total comments: 6

Messages

Total messages: 18 (3 generated)
Torne
All simple scripted changes to function prototypes. OWNERS for subdirs of chrome/browser: vabr: autofill, password_manager ...
5 years ago (2015-12-09 18:51:27 UTC) #2
Roger Tawa OOO till Jul 10th
c/b/signin lgtm
5 years ago (2015-12-09 19:19:31 UTC) #3
Marc Treib
c/b/interests lgtm https://codereview.chromium.org/1509373004/diff/1/chrome/browser/interests/android/interests_service.cc File chrome/browser/interests/android/interests_service.cc (right): https://codereview.chromium.org/1509373004/diff/1/chrome/browser/interests/android/interests_service.cc#newcode54 chrome/browser/interests/android/interests_service.cc:54: void InterestsService::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { ...
5 years ago (2015-12-10 08:37:17 UTC) #4
vabr (Chromium)
Rubberstamp LGTM for autofill and password_manager. And by rubberstamp I mean that it looked sane ...
5 years ago (2015-12-10 08:43:13 UTC) #5
Torne
On 2015/12/10 08:43:13, vabr (Chromium) wrote: > And by rubberstamp I mean that it looked ...
5 years ago (2015-12-10 11:25:41 UTC) #6
Torne
https://codereview.chromium.org/1509373004/diff/1/chrome/browser/interests/android/interests_service.cc File chrome/browser/interests/android/interests_service.cc (right): https://codereview.chromium.org/1509373004/diff/1/chrome/browser/interests/android/interests_service.cc#newcode54 chrome/browser/interests/android/interests_service.cc:54: void InterestsService::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { On 2015/12/10 ...
5 years ago (2015-12-10 11:26:01 UTC) #7
Marc Treib
https://codereview.chromium.org/1509373004/diff/1/chrome/browser/interests/android/interests_service.cc File chrome/browser/interests/android/interests_service.cc (right): https://codereview.chromium.org/1509373004/diff/1/chrome/browser/interests/android/interests_service.cc#newcode54 chrome/browser/interests/android/interests_service.cc:54: void InterestsService::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) { On 2015/12/10 ...
5 years ago (2015-12-10 11:46:02 UTC) #8
vabr (Chromium)
On 2015/12/10 11:25:41, Torne wrote: > On 2015/12/10 08:43:13, vabr (Chromium) wrote: > > And ...
5 years ago (2015-12-10 11:48:44 UTC) #9
maxbogue
sync LGTM % one missed jobject. https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile_sync_service_android.h File chrome/browser/sync/profile_sync_service_android.h (right): https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile_sync_service_android.h#newcode88 chrome/browser/sync/profile_sync_service_android.h:88: jboolean IsPassphraseRequired(JNIEnv* env, ...
5 years ago (2015-12-10 18:25:01 UTC) #10
Torne
https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile_sync_service_android.h File chrome/browser/sync/profile_sync_service_android.h (right): https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile_sync_service_android.h#newcode88 chrome/browser/sync/profile_sync_service_android.h:88: jboolean IsPassphraseRequired(JNIEnv* env, jobject obj); On 2015/12/10 18:25:01, maxbogue ...
5 years ago (2015-12-10 18:29:51 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1509373004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1509373004/1
5 years ago (2015-12-10 18:49:39 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years ago (2015-12-10 19:46:01 UTC) #14
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/0a4a3ab13de0876e43ca92cb6e7b4fb66a5b70d1 Cr-Commit-Position: refs/heads/master@{#364435}
5 years ago (2015-12-10 19:47:51 UTC) #16
maxbogue
https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile_sync_service_android.h File chrome/browser/sync/profile_sync_service_android.h (right): https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile_sync_service_android.h#newcode88 chrome/browser/sync/profile_sync_service_android.h:88: jboolean IsPassphraseRequired(JNIEnv* env, jobject obj); On 2015/12/10 18:29:51, Torne ...
5 years ago (2015-12-10 22:08:00 UTC) #17
Torne
5 years ago (2015-12-11 14:56:03 UTC) #18
Message was sent while issue was closed.
On 2015/12/10 22:08:00, maxbogue wrote:
>
https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile...
> File chrome/browser/sync/profile_sync_service_android.h (right):
> 
>
https://codereview.chromium.org/1509373004/diff/1/chrome/browser/sync/profile...
> chrome/browser/sync/profile_sync_service_android.h:88: jboolean
> IsPassphraseRequired(JNIEnv* env, jobject obj);
> On 2015/12/10 18:29:51, Torne wrote:
> > On 2015/12/10 18:25:01, maxbogue wrote:
> > > Missed one?
> > 
> > This isn't actually a JNI method, it's not called from Java code.
> > 
> > I'm only trying to enforce that all the JNI method parameters are
JavaParamRef
> > for now. In a future phase of this migration I'll be trying to get rid of
all
> > bare jobjects. Sorry for the inconsistency, but if I try to change
everything
> at
> > once it will be a nightmarishly large CL :)
> 
> Oh how interesting; this shouldn't actually be here if it's not used. I don't
> know how you generated this CL, but however you did it might be useful for
> finding other unused methods like this! I'll remove it in a followup.

I generated it by patching the JNI binding generator to spit out a list of all
the functions it generated bindings for as a side effect during the build, then
using nightmarish python scripts full of regex to find those functions and
update their prototypes :)

There isn't really any difference between a JNI-bound method and any other C++
method that just happens to take a JNIEnv* and a jobject/JavaRef<jobject> as its
first two parameters, so it's not really possible to assume across the board
that anything which looks like a JNI method but isn't used by the JNI generator
is unused - it might never have been intended to be a JNI method in the first
place and is called somewhere else. I'd suggest the answer here is to just use
the "normal" mechanisms of finding unused functions (e.g. seeing what the linker
discards at link time when using --gc-sections), though I'm not sure they're
particularly great ;)

Powered by Google App Engine
This is Rietveld 408576698