From bb84f63c5033f9e3f885b5a3d6d9a0b79c25182f Mon Sep 17 00:00:00 2001 From: wnwen Date: Wed, 17 Feb 2016 08:45:14 -0800 Subject: 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} --- base/android/java/templates/BuildConfig.template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'base/android/java') 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 } -- cgit v1.1