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

Issue 2620303004: Remove JNI onload callback vector construction in favour of direct calls. (Closed)

Created:
3 years, 11 months ago by Tobias Sargeant
Modified:
3 years, 10 months ago
CC:
Aaron Boodman, abarth-chromium, agrieve+watch_chromium.org, alokp+watch_chromium.org, anandc+watch-blimp_chromium.org, android-webview-reviews_chromium.org, bgoldman+watch-blimp_chromium.org, cbentzel+watch_chromium.org, chromium-reviews, chromoting-reviews_chromium.org, darin (slow to review), darin-cc_chromium.org, dtrainor+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, halliwell+watch_chromium.org, jam, jbudorick+watch_chromium.org, jochen+watch_chromium.org, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lcwu+watch_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, mikecase+watch_chromium.org, mlamouri+watch-content_chromium.org, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, Peter Beverloo, qsr+mojo_chromium.org, Simeon, scf+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org, AndyWu, viettrungluu+watch_chromium.org, vmpstr+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove JNI onload callback vector construction in favour of direct calls. As part of cleaning up JNI onload and initialization, this CL removes the current code that builds up a vector of callbacks, which are eventually run by base::android::OnJNIOnLoad{RegisterJNI,Init} in favour of calling the appropriate code directly from those functions (and the functions that call them). BUG=678579 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2620303004 Cr-Commit-Position: refs/heads/master@{#448955} Committed: https://chromium.googlesource.com/chromium/src/+/b9e287e5af645fe02056c99c36b6ffc40925ff07

Patch Set 1 #

Total comments: 4

Patch Set 2 : review comments #

Patch Set 3 : pass existing JNI env in one last place #

Patch Set 4 : rebase #

Patch Set 5 : clean up stray variable #

Patch Set 6 : rebase #

Patch Set 7 : rebase compile errors #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -219 lines) Patch
M android_webview/lib/main/webview_jni_onload.h View 1 1 chunk +1 line, -1 line 0 comments Download
M android_webview/lib/main/webview_jni_onload.cc View 1 3 chunks +10 lines, -16 lines 0 comments Download
M base/android/base_jni_onload.h View 1 1 chunk +5 lines, -10 lines 0 comments Download
M base/android/base_jni_onload.cc View 1 2 chunks +2 lines, -31 lines 0 comments Download
M chrome/app/android/chrome_jni_onload.h View 1 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/app/android/chrome_jni_onload.cc View 1 2 3 4 2 chunks +8 lines, -22 lines 0 comments Download
M chrome/browser/android/chrome_entry_point.cc View 1 2 3 4 5 2 chunks +2 lines, -10 lines 0 comments Download
M chrome/browser/android/monochrome_entry_point.cc View 1 2 3 4 5 2 chunks +1 line, -5 lines 0 comments Download
M chromecast/app/android/cast_jni_loader.cc View 1 2 3 3 chunks +8 lines, -7 lines 0 comments Download
M components/cronet/android/cronet_library_loader.cc View 1 2 chunks +7 lines, -7 lines 0 comments Download
M components/cronet/android/test/cronet_test_jni.cc View 1 2 chunks +4 lines, -10 lines 0 comments Download
M components/test/android/browsertests_apk/components_browser_tests_jni_onload.cc View 1 3 chunks +8 lines, -7 lines 0 comments Download
M content/app/android/content_jni_onload.cc View 1 2 chunks +8 lines, -19 lines 0 comments Download
M content/public/app/content_jni_onload.h View 1 1 chunk +2 lines, -5 lines 0 comments Download
M content/shell/android/browsertests_apk/content_browser_tests_jni_onload.cc View 1 2 3 4 5 6 3 chunks +9 lines, -8 lines 0 comments Download
M content/shell/android/linker_test_apk/chromium_linker_test_android.cc View 1 3 chunks +8 lines, -7 lines 0 comments Download
M content/shell/android/shell_library_loader.cc View 1 3 chunks +9 lines, -7 lines 0 comments Download
M mojo/android/javatests/init_library.cc View 1 3 chunks +12 lines, -10 lines 0 comments Download
M net/test/android/net_test_entry_point.cc View 1 1 chunk +4 lines, -1 line 0 comments Download
M net/test/android/net_test_jni_onload.h View 1 1 chunk +1 line, -1 line 0 comments Download
M net/test/android/net_test_jni_onload.cc View 1 2 chunks +5 lines, -12 lines 0 comments Download
M remoting/client/jni/remoting_jni_onload.cc View 1 1 chunk +6 lines, -7 lines 0 comments Download
M testing/android/native_test/native_test_jni_onload.cc View 1 2 3 4 5 6 2 chunks +10 lines, -12 lines 0 comments Download

Messages

Total messages: 47 (30 generated)
Tobias Sargeant
Torne, could you PTAL at this, before I start adding reviewers for all the test ...
3 years, 11 months ago (2017-01-11 17:07:50 UTC) #4
Torne
https://codereview.chromium.org/2620303004/diff/1/base/android/base_jni_onload.cc File base/android/base_jni_onload.cc (right): https://codereview.chromium.org/2620303004/diff/1/base/android/base_jni_onload.cc#newcode16 base/android/base_jni_onload.cc:16: base::android::InitVM(vm); Rather than passing JavaVM down through the RegisterJNI ...
3 years, 11 months ago (2017-01-12 13:33:53 UTC) #5
Tobias Sargeant
https://codereview.chromium.org/2620303004/diff/1/base/android/base_jni_onload.cc File base/android/base_jni_onload.cc (right): https://codereview.chromium.org/2620303004/diff/1/base/android/base_jni_onload.cc#newcode16 base/android/base_jni_onload.cc:16: base::android::InitVM(vm); On 2017/01/12 13:33:52, Torne wrote: > Rather than ...
3 years, 11 months ago (2017-01-12 14:27:56 UTC) #8
Torne
lgtm
3 years, 11 months ago (2017-01-12 14:36:12 UTC) #9
Tobias Sargeant
Hi Brett, I was wondering if you would you be prepared to review this? Torne ...
3 years, 11 months ago (2017-01-12 15:50:57 UTC) #11
Tobias Sargeant
Gently pinging this CL.
3 years, 11 months ago (2017-01-19 11:42:26 UTC) #17
Lambros
lgtm for remoting/
3 years, 11 months ago (2017-01-19 17:53:37 UTC) #19
slan
+sanfin, +tsunghung for FYI cast/ lgtm
3 years, 11 months ago (2017-01-19 18:08:58 UTC) #20
Ryan Sleevi
//net LGTM
3 years, 11 months ago (2017-01-19 18:49:59 UTC) #21
Tobias Sargeant
On 2017/01/19 11:42:26, Tobias Sargeant wrote: > Gently pinging this CL. Another ping...
3 years, 10 months ago (2017-02-03 10:24:18 UTC) #23
Ken Rockot(use gerrit already)
lgtm - please consider using IM to ping anyone who still needs to review this
3 years, 10 months ago (2017-02-03 11:35:38 UTC) #27
Ken Rockot(use gerrit already)
lgtm - please consider using IM to ping anyone who still needs to review this
3 years, 10 months ago (2017-02-03 11:35:38 UTC) #28
AndyWu
lgtm
3 years, 10 months ago (2017-02-03 18:05:54 UTC) #34
kelvinp
On 2017/02/03 18:05:54, AndyWu wrote: > lgtm Removing myself from the reviewer list as Lambros ...
3 years, 10 months ago (2017-02-03 18:09:47 UTC) #36
brettw
I don't understand the Java big picture here but the code looks a lot cleaner. ...
3 years, 10 months ago (2017-02-08 05:11:43 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620303004/120001
3 years, 10 months ago (2017-02-08 11:05:23 UTC) #44
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 11:10:42 UTC) #47
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/b9e287e5af645fe02056c99c36b6...

Powered by Google App Engine
This is Rietveld 408576698