diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 01:03:36 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-11 01:03:36 +0000 |
commit | 7c10f7553bf4da999f954e501fc2908e10dd3bcf (patch) | |
tree | 09ea21b6c28bc9132d0a2f4b678cc810a29e3fd1 | |
parent | 9a425422549b0dc33730e85bdae2fd441caa55da (diff) | |
download | chromium_src-7c10f7553bf4da999f954e501fc2908e10dd3bcf.zip chromium_src-7c10f7553bf4da999f954e501fc2908e10dd3bcf.tar.gz chromium_src-7c10f7553bf4da999f954e501fc2908e10dd3bcf.tar.bz2 |
Made logging not look up --enable-dcheck from command line
Made --enable-dcheck a parameter to InitLogging() and fixed up all
callsites.
BUG=62736
TEST=Manual
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70782
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70920
Review URL: http://codereview.chromium.org/6070006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70977 0039d316-1c4b-4281-b951-d872f2087c98
22 files changed, 118 insertions, 62 deletions
diff --git a/base/logging.cc b/base/logging.cc index 5b6e2c1..d66f01b 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -64,7 +64,7 @@ typedef pthread_mutex_t* MutexHandle; namespace logging { -bool g_enable_dcheck = false; +DcheckState g_dcheck_state = DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; VlogInfo* g_vlog_info = NULL; const char* const log_severity_names[LOG_NUM_SEVERITIES] = { @@ -353,10 +353,10 @@ bool InitializeLogFileHandle() { bool BaseInitLoggingImpl(const PathChar* new_log_file, LoggingDestination logging_dest, LogLockingState lock_log, - OldFileDeletionState delete_old) { + OldFileDeletionState delete_old, + DcheckState dcheck_state) { CommandLine* command_line = CommandLine::ForCurrentProcess(); - g_enable_dcheck = - command_line->HasSwitch(switches::kEnableDCHECK); + g_dcheck_state = dcheck_state; delete g_vlog_info; g_vlog_info = NULL; // Don't bother initializing g_vlog_info unless we use one of the diff --git a/base/logging.h b/base/logging.h index a097568..662deae 100644 --- a/base/logging.h +++ b/base/logging.h @@ -165,6 +165,11 @@ enum LogLockingState { LOCK_LOG_FILE, DONT_LOCK_LOG_FILE }; // Defaults to APPEND_TO_OLD_LOG_FILE. enum OldFileDeletionState { DELETE_OLD_LOG_FILE, APPEND_TO_OLD_LOG_FILE }; +enum DcheckState { + DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS, + ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS +}; + // TODO(avi): do we want to do a unification of character types here? #if defined(OS_WIN) typedef wchar_t PathChar; @@ -188,7 +193,8 @@ typedef char PathChar; bool BaseInitLoggingImpl(const PathChar* log_file, LoggingDestination logging_dest, LogLockingState lock_log, - OldFileDeletionState delete_old); + OldFileDeletionState delete_old, + DcheckState dcheck_state); // Sets the log file name and other global logging state. Calling this function // is recommended, and is normally done at the beginning of application init. @@ -203,8 +209,10 @@ bool BaseInitLoggingImpl(const PathChar* log_file, inline bool InitLogging(const PathChar* log_file, LoggingDestination logging_dest, LogLockingState lock_log, - OldFileDeletionState delete_old) { - return BaseInitLoggingImpl(log_file, logging_dest, lock_log, delete_old); + OldFileDeletionState delete_old, + DcheckState dcheck_state) { + return BaseInitLoggingImpl(log_file, logging_dest, lock_log, + delete_old, dcheck_state); } // Sets the log level. Anything at or above this level will be written to the @@ -600,10 +608,11 @@ enum { DEBUG_MODE = ENABLE_DLOG }; COMPACT_GOOGLE_LOG_EX_ERROR_REPORT(ClassName , ##__VA_ARGS__) #define COMPACT_GOOGLE_LOG_DCHECK COMPACT_GOOGLE_LOG_ERROR_REPORT const LogSeverity LOG_DCHECK = LOG_ERROR_REPORT; -// This is set to true in InitLogging when we want to enable the -// DCHECKs in release. -extern bool g_enable_dcheck; -#define DCHECK_IS_ON() (::logging::g_enable_dcheck && LOG_IS_ON(DCHECK)) +extern DcheckState g_dcheck_state; +#define DCHECK_IS_ON() \ + ((::logging::g_dcheck_state == \ + ::logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS) && \ + LOG_IS_ON(DCHECK)) #else // defined(NDEBUG) diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc index 4b7fdbc..bb6e3d1 100644 --- a/base/logging_unittest.cc +++ b/base/logging_unittest.cc @@ -197,7 +197,7 @@ TEST_F(LoggingTest, DcheckStreamsAreLazy) { #if !defined(LOGGING_IS_OFFICIAL_BUILD) && defined(NDEBUG) // Unofficial release build. - logging::g_enable_dcheck = false; + g_dcheck_state = DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; DCHECK(mock_log_source.Log()) << mock_log_source.Log(); DPCHECK(mock_log_source.Log()) << mock_log_source.Log(); DCHECK_EQ(0, 0) << mock_log_source.Log(); @@ -213,13 +213,13 @@ TEST_F(LoggingTest, Dcheck) { EXPECT_FALSE(DLOG_IS_ON(DCHECK)); #elif defined(NDEBUG) // Unofficial release build. - logging::g_enable_dcheck = true; - logging::SetLogReportHandler(&LogSink); + g_dcheck_state = ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; + SetLogReportHandler(&LogSink); EXPECT_TRUE(DCHECK_IS_ON()); EXPECT_FALSE(DLOG_IS_ON(DCHECK)); #else // Unofficial debug build. - logging::SetLogAssertHandler(&LogSink); + SetLogAssertHandler(&LogSink); EXPECT_TRUE(DCHECK_IS_ON()); EXPECT_TRUE(DLOG_IS_ON(DCHECK)); #endif // defined(LOGGING_IS_OFFICIAL_BUILD) diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc index aa23f04..5f8a616 100644 --- a/base/test/test_suite.cc +++ b/base/test/test_suite.cc @@ -175,10 +175,12 @@ void TestSuite::Initialize() { FilePath exe; PathService::Get(base::FILE_EXE, &exe); FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); - logging::InitLogging(log_filename.value().c_str(), - logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, - logging::LOCK_LOG_FILE, - logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + log_filename.value().c_str(), + logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); // We want process and thread IDs because we may have multiple processes. // Note: temporarily enabled timestamps in an effort to catch bug 6361. logging::SetLogItems(true, true, true, true); diff --git a/ceee/ie/broker/broker_module.cc b/ceee/ie/broker/broker_module.cc index 71a007a..d90cf70 100644 --- a/ceee/ie/broker/broker_module.cc +++ b/ceee/ie/broker/broker_module.cc @@ -110,7 +110,8 @@ CeeeBrokerModule::CeeeBrokerModule() logfile_path, logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); // Initialize ETW logging. logging::LogEventProvider::Initialize(kCeeeBrokerLogProviderName); diff --git a/ceee/ie/plugin/toolband/toolband_module.cc b/ceee/ie/plugin/toolband/toolband_module.cc index bb5ee4a..c41bd23 100644 --- a/ceee/ie/plugin/toolband/toolband_module.cc +++ b/ceee/ie/plugin/toolband/toolband_module.cc @@ -98,7 +98,8 @@ ToolbandModule::ToolbandModule() logfile_path, logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); // Initialize ETW logging. logging::LogEventProvider::Initialize(kCeeeIeLogProviderName); diff --git a/ceee/installer_dll/installer_helper.cc b/ceee/installer_dll/installer_helper.cc index f20c8e8..2128228 100644 --- a/ceee/installer_dll/installer_helper.cc +++ b/ceee/installer_dll/installer_helper.cc @@ -46,7 +46,8 @@ InstallerHelperModule::InstallerHelperModule() { logfile_path, logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); } InstallerHelperModule _AtlModule; diff --git a/chrome/browser/sync/tools/sync_listen_notifications.cc b/chrome/browser/sync/tools/sync_listen_notifications.cc index 0f66c27..27e3010 100644 --- a/chrome/browser/sync/tools/sync_listen_notifications.cc +++ b/chrome/browser/sync/tools/sync_listen_notifications.cc @@ -222,8 +222,12 @@ class ServerNotifierDelegate int main(int argc, char* argv[]) { base::AtExitManager exit_manager; CommandLine::Init(argc, argv); - logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, - logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + NULL, + logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); logging::SetMinLogLevel(logging::LOG_INFO); // TODO(akalin): Make sure that all log messages are printed to the // console, even on Windows (SetMinLogLevel isn't enough). diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index c607f21..9653c40 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -216,12 +216,18 @@ void RedirectChromeLogging(const CommandLine& command_line) { // Always force a new symlink when redirecting. FilePath target_path = SetUpSymlinkIfNeeded(log_path, true); + logging::DcheckState dcheck_state = + command_line.HasSwitch(switches::kEnableDCHECK) ? + logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS : + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; + // ChromeOS always logs through the symlink, so it shouldn't be // deleted if it already exists. if (!InitLogging(log_path.value().c_str(), DetermineLogMode(command_line), logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE)) { + logging::APPEND_TO_OLD_LOG_FILE, + dcheck_state)) { LOG(ERROR) << "Unable to initialize logging to " << log_path.value(); RemoveSymlinkAndLog(log_path, target_path); } else { @@ -262,10 +268,16 @@ void InitChromeLogging(const CommandLine& command_line, delete_old_log_file = logging::APPEND_TO_OLD_LOG_FILE; #endif + logging::DcheckState dcheck_state = + command_line.HasSwitch(switches::kEnableDCHECK) ? + logging::ENABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS : + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; + bool success = InitLogging(log_path.value().c_str(), DetermineLogMode(command_line), logging::LOCK_LOG_FILE, - delete_old_log_file); + delete_old_log_file, + dcheck_state); #if defined(OS_CHROMEOS) if (!success) { diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc index d91ca70..73e1719 100644 --- a/chrome/installer/util/logging_installer.cc +++ b/chrome/installer/util/logging_installer.cc @@ -38,10 +38,12 @@ void InitInstallerLogging(const installer::MasterPreferences& prefs) { return; } - logging::InitLogging(GetLogFilePath(prefs).value().c_str(), - logging::LOG_ONLY_TO_FILE, - logging::LOCK_LOG_FILE, - logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + GetLogFilePath(prefs).value().c_str(), + logging::LOG_ONLY_TO_FILE, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); if (prefs.GetBool(installer::master_preferences::kVerboseLogging, &value) && value) { diff --git a/chrome/tools/crash_service/main.cc b/chrome/tools/crash_service/main.cc index 4a8e56a..b9cabec6 100644 --- a/chrome/tools/crash_service/main.cc +++ b/chrome/tools/crash_service/main.cc @@ -45,8 +45,12 @@ int __stdcall wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd_line, FilePath log_file = operating_dir.Append(kStandardLogFile); // Logging to a file with pid, tid and timestamp. - logging::InitLogging(log_file.value().c_str(), logging::LOG_ONLY_TO_FILE, - logging::LOCK_LOG_FILE, logging::APPEND_TO_OLD_LOG_FILE); + logging::InitLogging( + log_file.value().c_str(), + logging::LOG_ONLY_TO_FILE, + logging::LOCK_LOG_FILE, + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); logging::SetLogItems(true, true, true, false); VLOG(1) << "session start. cmdline is [" << cmd_line << "]"; diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc index b966e5c..5e65160 100644 --- a/chrome_frame/chrome_tab.cc +++ b/chrome_frame/chrome_tab.cc @@ -209,8 +209,12 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, g_exit_manager = new base::AtExitManager(); CommandLine::Init(0, NULL); InitializeCrashReporting(); - logging::InitLogging(NULL, logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, - logging::LOCK_LOG_FILE, logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + NULL, + logging::LOG_ONLY_TO_SYSTEM_DEBUG_LOG, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); DllRedirector* dll_redirector = DllRedirector::GetInstance(); DCHECK(dll_redirector); diff --git a/chrome_frame/crash_reporting/minidump_test.cc b/chrome_frame/crash_reporting/minidump_test.cc index 106b4df..5f71c97 100644 --- a/chrome_frame/crash_reporting/minidump_test.cc +++ b/chrome_frame/crash_reporting/minidump_test.cc @@ -434,9 +434,11 @@ int main(int argc, char** argv) { testing::InitGoogleTest(&argc, argv); CommandLine::Init(argc, argv); - logging::InitLogging(L"CON", - logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, - logging::DONT_LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::InitLogging( + L"CON", + logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, + logging::DONT_LOCK_LOG_FILE, + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); return RUN_ALL_TESTS(); } diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index ca30329..118496c 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -384,10 +384,12 @@ void CFUrlRequestUnittestRunner::InitializeLogging() { FilePath exe; PathService::Get(base::FILE_EXE, &exe); FilePath log_filename = exe.ReplaceExtension(FILE_PATH_LITERAL("log")); - logging::InitLogging(log_filename.value().c_str(), - logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, - logging::LOCK_LOG_FILE, - logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + log_filename.value().c_str(), + logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); // We want process and thread IDs because we may have multiple processes. // Note: temporarily enabled timestamps in an effort to catch bug 6361. logging::SetLogItems(true, true, true, true); diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc index 5e37f30..7176442 100644 --- a/courgette/courgette_tool.cc +++ b/courgette/courgette_tool.cc @@ -346,10 +346,12 @@ int main(int argc, const char* argv[]) { CommandLine::Init(argc, argv); const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - (void)logging::InitLogging(FILE_PATH_LITERAL("courgette.log"), - logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, - logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + (void)logging::InitLogging( + FILE_PATH_LITERAL("courgette.log"), + logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, + logging::LOCK_LOG_FILE, + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); logging::SetMinLogLevel(logging::LOG_VERBOSE); bool cmd_dis = command_line.HasSwitch("dis"); diff --git a/net/tools/flip_server/flip_in_mem_edsm_server.cc b/net/tools/flip_server/flip_in_mem_edsm_server.cc index a378e72..6d4ed8f 100644 --- a/net/tools/flip_server/flip_in_mem_edsm_server.cc +++ b/net/tools/flip_server/flip_in_mem_edsm_server.cc @@ -3057,7 +3057,8 @@ int main (int argc, char**argv) InitLogging(g_proxy_config.log_filename_.c_str(), g_proxy_config.log_destination_, logging::DONT_LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); LOG(INFO) << "Flip SPDY proxy started with configuration:"; LOG(INFO) << "Logging destination : " << g_proxy_config.log_destination_; diff --git a/net/tools/testserver/run_testserver.cc b/net/tools/testserver/run_testserver.cc index 650b415..bfaa682 100644 --- a/net/tools/testserver/run_testserver.cc +++ b/net/tools/testserver/run_testserver.cc @@ -24,10 +24,12 @@ int main(int argc, const char* argv[]) { CommandLine::Init(argc, argv); CommandLine* command_line = CommandLine::ForCurrentProcess(); - if (!logging::InitLogging(FILE_PATH_LITERAL("testserver.log"), - logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, - logging::LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE)) { + if (!logging::InitLogging( + FILE_PATH_LITERAL("testserver.log"), + logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, + logging::LOCK_LOG_FILE, + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS)) { printf("Error: could not initialize logging. Exiting.\n"); return -1; } diff --git a/net/tools/tld_cleanup/tld_cleanup.cc b/net/tools/tld_cleanup/tld_cleanup.cc index e055577..be723c4 100644 --- a/net/tools/tld_cleanup/tld_cleanup.cc +++ b/net/tools/tld_cleanup/tld_cleanup.cc @@ -266,10 +266,12 @@ int main(int argc, const char* argv[]) { FilePath log_filename; PathService::Get(base::DIR_EXE, &log_filename); log_filename = log_filename.AppendASCII("tld_cleanup.log"); - logging::InitLogging(log_filename.value().c_str(), - destination, - logging::LOCK_LOG_FILE, - logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + log_filename.value().c_str(), + destination, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); icu_util::Initialize(); diff --git a/o3d/plugin/cross/main.cc b/o3d/plugin/cross/main.cc index e17ba64..31afc5e 100644 --- a/o3d/plugin/cross/main.cc +++ b/o3d/plugin/cross/main.cc @@ -337,7 +337,8 @@ NPError EXPORT_SYMBOL OSCALL NP_Initialize(NPNetscapeFuncs *browserFuncs InitLogging(log.value().c_str(), logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, logging::DONT_LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); #endif // O3D_INTERNAL_PLUGIN DLOG(INFO) << "NP_Initialize"; diff --git a/o3d/plugin/cross/main_remote_cb.cc b/o3d/plugin/cross/main_remote_cb.cc index e2346ed..0ea1234 100644 --- a/o3d/plugin/cross/main_remote_cb.cc +++ b/o3d/plugin/cross/main_remote_cb.cc @@ -74,7 +74,8 @@ NPError EXPORT_SYMBOL OSCALL NP_Initialize(NPNetscapeFuncs *browserFuncs) { InitLogging(kLogFile, logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG, logging::DONT_LOCK_LOG_FILE, - logging::APPEND_TO_OLD_LOG_FILE); + logging::APPEND_TO_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); NPError retval = InitializeNPNApi(browserFuncs); if (retval != NPERR_NO_ERROR) return retval; diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index e9eed2e..52a2a34 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -93,7 +93,8 @@ void InitLogging(bool enable_gp_fault_error_box) { logging::LOG_ONLY_TO_FILE, // We might have multiple DumpRenderTree processes going at once. logging::LOCK_LOG_FILE, - logging::DELETE_OLD_LOG_FILE); + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); // We want process and thread IDs because we may have multiple processes. const bool kProcessId = true; diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index ce83655..a1a6927 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -417,10 +417,12 @@ void TestShell::InitLogging(bool suppress_error_dialogs, FilePath log_filename; PathService::Get(base::DIR_EXE, &log_filename); log_filename = log_filename.AppendASCII("test_shell.log"); - logging::InitLogging(log_filename.value().c_str(), - destination, - logging::LOCK_LOG_FILE, - logging::DELETE_OLD_LOG_FILE); + logging::InitLogging( + log_filename.value().c_str(), + destination, + logging::LOCK_LOG_FILE, + logging::DELETE_OLD_LOG_FILE, + logging::DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS); // we want process and thread IDs because we may have multiple processes logging::SetLogItems(true, true, false, true); |