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

Issue 2219923002: JNI: allow either JavaRef or bare objects in Java calls. (Closed)

Created:
4 years, 4 months ago by Torne
Modified:
4 years, 4 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

JNI: allow either JavaRef or bare objects in Java calls. Introduce a temporary type JavaRefOrBare which can be constructed from either a JavaRef or a bare object, and use it as the parameter type for Java function stubs generated by the JNI generator. This allows Java functions to be called using a mixture of both types, so we can incrementally move to using JavaRef only. Also replace NULL with nullptr in scoped_java_ref.{h,cc} as the inconsistency looked weird. BUG=506850 Committed: https://crrev.com/8a372f72544bab76e3a745170e9497f54e211fe5 Cr-Commit-Position: refs/heads/master@{#410377}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove unreachable line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+776 lines, -642 lines) Patch
M base/android/jni_generator/golden_sample_for_tests_jni.h View 12 chunks +32 lines, -29 lines 0 comments Download
M base/android/jni_generator/jni_generator.py View 1 3 chunks +14 lines, -5 lines 0 comments Download
M base/android/jni_generator/testCalledByNatives.golden View 30 chunks +83 lines, -69 lines 0 comments Download
M base/android/jni_generator/testConstantsFromJavaP.golden View 88 chunks +529 lines, -459 lines 0 comments Download
M base/android/jni_generator/testFromJavaP.golden View 10 chunks +62 lines, -48 lines 0 comments Download
M base/android/jni_generator/testFromJavaPGenerics.golden View 2 chunks +6 lines, -5 lines 0 comments Download
M base/android/jni_generator/testMultipleJNIAdditionalImport.golden View 2 chunks +4 lines, -3 lines 0 comments Download
M base/android/jni_generator/testNativeExportsOnlyOption.golden View 4 chunks +8 lines, -8 lines 0 comments Download
M base/android/jni_generator/testSingleJNIAdditionalImport.golden View 2 chunks +3 lines, -2 lines 0 comments Download
M base/android/scoped_java_ref.h View 6 chunks +24 lines, -9 lines 0 comments Download
M base/android/scoped_java_ref.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/android/preferences/website_preference_bridge.cc View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 17 (9 generated)
Torne
Compared release binary size for libchrome.so and it causes a few extra stack allocations to ...
4 years, 4 months ago (2016-08-05 16:27:35 UTC) #2
rmcilroy
LGTM with a comment. https://codereview.chromium.org/2219923002/diff/1/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/2219923002/diff/1/base/android/jni_generator/jni_generator.py#newcode1041 base/android/jni_generator/jni_generator.py:1041: c_type = JavaDataTypeToC(java_type) is this ...
4 years, 4 months ago (2016-08-08 13:08:29 UTC) #7
Torne
https://codereview.chromium.org/2219923002/diff/1/base/android/jni_generator/jni_generator.py File base/android/jni_generator/jni_generator.py (right): https://codereview.chromium.org/2219923002/diff/1/base/android/jni_generator/jni_generator.py#newcode1041 base/android/jni_generator/jni_generator.py:1041: c_type = JavaDataTypeToC(java_type) On 2016/08/08 13:08:29, rmcilroy wrote: > ...
4 years, 4 months ago (2016-08-08 13:34:24 UTC) #8
Torne
+bauerb for chrome/browser/android OWNERS
4 years, 4 months ago (2016-08-08 13:34:51 UTC) #10
Bernhard Bauer
lgtm
4 years, 4 months ago (2016-08-08 15:46:25 UTC) #11
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/2219923002/20001
4 years, 4 months ago (2016-08-08 15:47:13 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-08 16:29:54 UTC) #15
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 16:34:40 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/8a372f72544bab76e3a745170e9497f54e211fe5
Cr-Commit-Position: refs/heads/master@{#410377}

Powered by Google App Engine
This is Rietveld 408576698