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

Issue 2162923002: jni_generator: Always generate native exports. (Closed)

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

Description

jni_generator: Always generate native exports. Native exports work better (faster startup) and generally only have one real downside: incompatibility with the chromium custom linker. We compile all code with --native_exports --native_exports_optional for a while now, which provides the native exports while also having explicit registration functions for the custom linker case. We may want to build with only native exports in future, but it doesn't seem likely we'll want to go back to only having explicit registration, so simplify the code (and improve the test coverage) by: 1) Removing the native_exports flag and making it always true. 2) Changing the tests to use optional native exports by default, matching Chromium behaviour, except for a specific test to verify that native-exports-only still works. This will make it easier to eliminate RegisterNativesImpl methods in cases where it's currently a no-op in crbug.com/603936, as there will be fewer cases to consider. BUG=603936 Committed: https://crrev.com/0cf1db3d8a236c11ecad2201e78981dfb7cc951c Cr-Commit-Position: refs/heads/master@{#406815}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -684 lines) Patch
M base/android/jni_generator/golden_sample_for_tests_jni.h View 12 chunks +33 lines, -30 lines 0 comments Download
M base/android/jni_generator/jni_generator.py View 11 chunks +10 lines, -45 lines 0 comments Download
M base/android/jni_generator/jni_generator_tests.py View 3 chunks +4 lines, -14 lines 0 comments Download
M base/android/jni_generator/testCalledByNatives.golden View 2 chunks +5 lines, -9 lines 0 comments Download
M base/android/jni_generator/testConstantsFromJavaP.golden View 2 chunks +3 lines, -5 lines 0 comments Download
M base/android/jni_generator/testFromJavaP.golden View 2 chunks +3 lines, -5 lines 0 comments Download
M base/android/jni_generator/testFromJavaPGenerics.golden View 2 chunks +3 lines, -5 lines 0 comments Download
M base/android/jni_generator/testInnerClassNatives.golden View 3 chunks +8 lines, -11 lines 0 comments Download
M base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden View 3 chunks +10 lines, -12 lines 0 comments Download
M base/android/jni_generator/testInnerClassNativesMultiple.golden View 3 chunks +13 lines, -17 lines 0 comments Download
M base/android/jni_generator/testMultipleJNIAdditionalImport.golden View 3 chunks +5 lines, -7 lines 0 comments Download
A + base/android/jni_generator/testNativeExportsOnlyOption.golden View 0 chunks +-1 lines, --1 lines 0 comments Download
D base/android/jni_generator/testNativeExportsOption.golden View 1 chunk +0 lines, -203 lines 0 comments Download
D base/android/jni_generator/testNativeExportsOptionalOption.golden View 1 chunk +0 lines, -282 lines 0 comments Download
M base/android/jni_generator/testNatives.golden View 13 chunks +37 lines, -27 lines 0 comments Download
M base/android/jni_generator/testNativesLong.golden View 2 chunks +5 lines, -6 lines 0 comments Download
M base/android/jni_generator/testSingleJNIAdditionalImport.golden View 3 chunks +5 lines, -7 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
Torne
Ross, does this look reasonable? We've used only native_exports_optional in chromium for a while now. ...
4 years, 5 months ago (2016-07-19 13:17:21 UTC) #2
rmcilroy
On 2016/07/19 13:17:21, Torne wrote: > Ross, does this look reasonable? We've used only native_exports_optional ...
4 years, 5 months ago (2016-07-21 09:23:51 UTC) #3
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/2162923002/1
4 years, 5 months ago (2016-07-21 09:30:57 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-21 10:42:14 UTC) #6
commit-bot: I haz the power
4 years, 5 months ago (2016-07-21 10:43:37 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/0cf1db3d8a236c11ecad2201e78981dfb7cc951c
Cr-Commit-Position: refs/heads/master@{#406815}

Powered by Google App Engine
This is Rietveld 408576698