Fix no_global_constructors in remote_bitrate_estimator.

Bug: webrtc:9693
Change-Id: Ibd8f0e89a7b37ad26d4cb3e73c395f77ed988ac9
Reviewed-on: https://webrtc-review.googlesource.com/98584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24682}
This commit is contained in:
Mirko Bonadei 2018-09-11 10:49:41 +02:00 committed by Commit Bot
parent 169e04212e
commit 7255fef258
3 changed files with 4 additions and 8 deletions

View File

@ -33,10 +33,8 @@ rtc_static_library("remote_bitrate_estimator") {
if (rtc_enable_bwe_test_logging) {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1" ]
configs += [
"../..:no_exit_time_destructors",
"../..:no_global_constructors",
]
configs += [ "../..:no_exit_time_destructors" ]
sources += [ "test/bwe_test_logging.cc" ]
} else {
defines = [ "BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0" ]

View File

@ -26,8 +26,6 @@ namespace webrtc {
namespace testing {
namespace bwe {
Logging Logging::g_Logging;
static std::string ToString(uint32_t v) {
rtc::StringBuilder ss;
ss << v;
@ -58,7 +56,8 @@ Logging::Context::~Context() {
}
Logging* Logging::GetInstance() {
return &g_Logging;
static Logging* logging = new Logging();
return logging;
}
void Logging::SetGlobalContext(uint32_t name) {

View File

@ -346,7 +346,6 @@ class Logging {
bool enabled);
void PopState();
static Logging g_Logging;
rtc::CriticalSection crit_sect_;
ThreadMap thread_map_;