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

Issue 2020373002: [Cronet] Call System.loadLibrary() from impl not API (Closed)

Created:
4 years, 6 months ago by pauljensen
Modified:
4 years, 5 months ago
Reviewers:
kapishnikov
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@implpack
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Cronet] Call System.loadLibrary() from impl not API When a shared library is loaded, the caller's ClassLoader is used for two important things: 1. to load classes for JNI bindings, and 2. to find the shared library Since Cronet's shared library is tied to the implementation, Cronet should be sure to call System.loadLibrary() from the implementation, not the API. This way the impl's ClassLoader will be used which could be different from the API's ClassLoader, and the impl's ClassLoader is the one that will be able to load the impl classes and locate the shared library. Committed: https://crrev.com/ae2265a39356fdec3fe217293c6e93e77893be15 Cr-Commit-Position: refs/heads/master@{#407452}

Patch Set 1 #

Total comments: 3

Patch Set 2 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -7 lines) Patch
M components/cronet/android/api/src/org/chromium/net/CronetEngine.java View 1 2 chunks +9 lines, -6 lines 0 comments Download
M components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java View 1 chunk +5 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 10 (3 generated)
kapishnikov
https://codereview.chromium.org/2020373002/diff/1/components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java File components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java (right): https://codereview.chromium.org/2020373002/diff/1/components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java#newcode45 components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java:45: builder.libraryLoader().loadLibrary(builder.libraryName()); If the client passes the custom library loader ...
4 years, 6 months ago (2016-06-02 16:33:38 UTC) #2
pauljensen
Andrei, would you like to review this? https://codereview.chromium.org/2020373002/diff/1/components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java File components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java (right): https://codereview.chromium.org/2020373002/diff/1/components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java#newcode45 components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java:45: builder.libraryLoader().loadLibrary(builder.libraryName()); On ...
4 years, 5 months ago (2016-07-22 14:18:05 UTC) #3
pauljensen
https://codereview.chromium.org/2020373002/diff/1/components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java File components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java (right): https://codereview.chromium.org/2020373002/diff/1/components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java#newcode45 components/cronet/android/java/src/org/chromium/net/impl/CronetLibraryLoader.java:45: builder.libraryLoader().loadLibrary(builder.libraryName()); On 2016/07/22 14:18:04, pauljensen wrote: > On 2016/06/02 ...
4 years, 5 months ago (2016-07-22 14:18:42 UTC) #4
kapishnikov
Looks good. We should later make sure that CronetEngine.setLibraryLoader() is hidden or functions properly. LGTM
4 years, 5 months ago (2016-07-22 14:41:48 UTC) #5
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/2020373002/20001
4 years, 5 months ago (2016-07-25 11:32:46 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-25 11:58:58 UTC) #8
commit-bot: I haz the power
4 years, 5 months ago (2016-07-25 12:00:07 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ae2265a39356fdec3fe217293c6e93e77893be15
Cr-Commit-Position: refs/heads/master@{#407452}

Powered by Google App Engine
This is Rietveld 408576698