summaryrefslogtreecommitdiffstats
path: root/base/android/java
diff options
context:
space:
mode:
authorwnwen <wnwen@chromium.org>2016-02-17 08:45:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-17 16:46:27 +0000
commitbb84f63c5033f9e3f885b5a3d6d9a0b79c25182f (patch)
tree83dc805eea8ac88e2d9bed8e6e2dc2c67b66f619 /base/android/java
parent16149a9fda6c52699a548f30587dfcf1612b5e4c (diff)
downloadchromium_src-bb84f63c5033f9e3f885b5a3d6d9a0b79c25182f.zip
chromium_src-bb84f63c5033f9e3f885b5a3d6d9a0b79c25182f.tar.gz
chromium_src-bb84f63c5033f9e3f885b5a3d6d9a0b79c25182f.tar.bz2
Make debug flag final for compiler optimizations.
Since NDEBUG is constant at gyp/gn compile time and does not vary between targets, it can be marked final and potentially optimized out. BUG=583690 Review URL: https://codereview.chromium.org/1701303002 Cr-Commit-Position: refs/heads/master@{#375903}
Diffstat (limited to 'base/android/java')
-rw-r--r--base/android/java/templates/BuildConfig.template5
1 files changed, 3 insertions, 2 deletions
diff --git a/base/android/java/templates/BuildConfig.template b/base/android/java/templates/BuildConfig.template
index d43a201..9a678cc 100644
--- a/base/android/java/templates/BuildConfig.template
+++ b/base/android/java/templates/BuildConfig.template
@@ -22,10 +22,11 @@ public class BuildConfig {
#endif
}
+ // Debug does not change between targets, can be final and optimized out.
#if defined(NDEBUG)
- public static boolean sIsDebug = true;
+ public static final boolean sIsDebug = true;
#else
- public static boolean sIsDebug = false;
+ public static final boolean sIsDebug = false;
#endif
}