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

Issue 2671033003: Android: Proguard rules to allow shrinking for <native> (Closed)

Created:
3 years, 10 months ago by agrieve
Modified:
3 years, 10 months ago
Reviewers:
estevenson
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Android: Proguard rules to allow shrinking for <native> This removes ~200 unused methods on the java side (but not their native side implementations). ChomePublic's dex shrinks by ~10kb. BUG=688465

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M base/android/proguard/chromium_code.flags View 2 chunks +5 lines, -1 line 0 comments Download

Messages

Total messages: 9 (6 generated)
agrieve
On 2017/02/03 19:12:14, agrieve wrote: > The CQ bit was checked by mailto:agrieve@chromium.org to run ...
3 years, 10 months ago (2017-02-03 19:12:21 UTC) #4
estevenson
lgtm
3 years, 10 months ago (2017-02-03 19:17:56 UTC) #6
agrieve
3 years, 10 months ago (2017-02-06 11:26:44 UTC) #9
On 2017/02/03 19:17:56, estevenson wrote:
> lgtm

Looks like this will need to wait until we refactor the native registrations as
well:
Device(038494cc003bfd13) 02-03 20:29:23.899  4206  4248 E dalvikvm: ERROR:
couldn't find native method
Device(038494cc003bfd13) 02-03 20:29:23.899  4206  4248 E dalvikvm: Requested:
Lorg/chromium/base/JavaExceptionReporter;.nativeReportJavaStackTrace:(Ljava/lang/String;)V
Device(038494cc003bfd13) 02-03 20:29:23.899  4206  4248 E chromium:
[0203/202923.917849:ERROR:jni_generator_helper.h(38)] RegisterNatives failed in
gen/base/base_jni_headers/base/jni/JavaExceptionReporter_jni.h
Device(038494cc003bfd13) 02-03 20:29:23.899  4206  4248 E chromium:
[0203/202923.918175:ERROR:jni_registrar.cc(21)] JavaExceptionReporter failed
registration!
Device(038494cc003bfd13) 02-03 20:29:23.909  4206  4248 W System.err:
java.lang.NoSuchMethodError: no static or non-static method
"Lorg/chromium/base/JavaExceptionReporter;.nativeReportJavaStackTrace(Ljava/lang/String;)V"


RegisterNatives fails if the native function is removed by proguard.

Closing this out.

Powered by Google App Engine
This is Rietveld 408576698