Commit fe0a996d authored by Felicia Lim's avatar Felicia Lim Committed by Commit Bot

[opus] Don't print assertion messages in release builds

Bug: 1053572
Change-Id: I60c36728362994815fb376cefe5d623c2bcb3d67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2065855Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Felicia Lim <flim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743271}
parent 4b75f3cf
...@@ -65,6 +65,11 @@ config("opus_private_config") { ...@@ -65,6 +65,11 @@ config("opus_private_config") {
] ]
} }
if (is_official_build) {
# Disable assertion messages from ENABLE_HARDENING, saving 16.4 kb.
defines += [ "CHROMIUM_NO_LOGGING" ]
}
if (is_debug) { if (is_debug) {
# Turn off a warning in opus_decoder.c when compiling without optimization. # Turn off a warning in opus_decoder.c when compiling without optimization.
defines += [ "OPUS_WILL_BE_SLOW" ] defines += [ "OPUS_WILL_BE_SLOW" ]
......
...@@ -14,6 +14,7 @@ encoding/decoding. ...@@ -14,6 +14,7 @@ encoding/decoding.
Local changes: Local changes:
* copy .gitignore from https://git.xiph.org/?p=opus.git;a=tree * copy .gitignore from https://git.xiph.org/?p=opus.git;a=tree
* set 'x' flags: "chmod 750 win32/genversion.bat" * set 'x' flags: "chmod 750 win32/genversion.bat"
* remove assertion messages in release builds (see crbug/1053572)
Opus' own unit tests are located in ./src/tests Opus' own unit tests are located in ./src/tests
Additional chromium tests are located in ./tests Additional chromium tests are located in ./tests
...@@ -72,7 +72,9 @@ __attribute__((noreturn)) ...@@ -72,7 +72,9 @@ __attribute__((noreturn))
#endif #endif
void celt_fatal(const char *str, const char *file, int line) void celt_fatal(const char *str, const char *file, int line)
{ {
#if !defined(CHROMIUM_NO_LOGGING)
fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str); fprintf (stderr, "Fatal (internal) error in %s, line %d: %s\n", file, line, str);
#endif
abort(); abort();
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment