diff options
-rw-r--r-- | base/command_line.cc | 8 | ||||
-rw-r--r-- | base/command_line.h | 10 | ||||
-rw-r--r-- | base/test/test_suite.h | 2 | ||||
-rw-r--r-- | o3d/plugin/linux/main_linux.cc | 2 | ||||
-rw-r--r-- | o3d/plugin/mac/main_mac.mm | 2 | ||||
-rw-r--r-- | o3d/plugin/win/main_win.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/run_all_tests.cc | 2 |
7 files changed, 11 insertions, 17 deletions
diff --git a/base/command_line.cc b/base/command_line.cc index bbd25b8..ac8402cb 100644 --- a/base/command_line.cc +++ b/base/command_line.cc @@ -191,12 +191,6 @@ bool CommandLine::IsSwitch(const StringType& parameter_string, } // static -void CommandLine::Reset() { - delete current_process_commandline_; - current_process_commandline_ = NULL; -} - -// static void CommandLine::Init(int argc, const char* const* argv) { #if defined(OS_WIN) current_process_commandline_ = new CommandLine; @@ -240,7 +234,7 @@ void CommandLine::SetTrueArgv(char** argv) { } #endif -void CommandLine::Terminate() { +void CommandLine::Reset() { DCHECK(current_process_commandline_ != NULL); delete current_process_commandline_; current_process_commandline_ = NULL; diff --git a/base/command_line.h b/base/command_line.h index c6aae86..3eb3dbb 100644 --- a/base/command_line.h +++ b/base/command_line.h @@ -48,9 +48,6 @@ class CommandLine { // Deprecated in favor of FilePath version. explicit CommandLine(const std::wstring& program); - // Uninit and free the current process's command line. - static void Reset(); - // Initialize the current process CommandLine singleton. On Windows, // ignores its arguments (we instead parse GetCommandLineW() // directly) because we don't trust the CRT's parsing of the command @@ -71,9 +68,12 @@ class CommandLine { // Destroys the current process CommandLine singleton. This is necessary if // you want to reset the base library to its initial state (for example in an // outer library that needs to be able to terminate, and be re-initialized). - // If Init is called only once, e.g. in main(), calling Terminate() is not + // If Init is called only once, e.g. in main(), calling Reset() is not // necessary. - static void Terminate(); + static void Reset(); + // The same function snuck into this class under two different names; + // this one remains for backwards compat with the older o3d build. + static void Terminate() { Reset(); } // Get the singleton CommandLine representing the current process's // command line. diff --git a/base/test/test_suite.h b/base/test/test_suite.h index 1203904..863721a 100644 --- a/base/test/test_suite.h +++ b/base/test/test_suite.h @@ -75,7 +75,7 @@ class TestSuite { } virtual ~TestSuite() { - CommandLine::Terminate(); + CommandLine::Reset(); } // Returns true if a string starts with FLAKY_. diff --git a/o3d/plugin/linux/main_linux.cc b/o3d/plugin/linux/main_linux.cc index 45cc982..594d255 100644 --- a/o3d/plugin/linux/main_linux.cc +++ b/o3d/plugin/linux/main_linux.cc @@ -662,7 +662,7 @@ NPError EXPORT_SYMBOL OSCALL NP_Shutdown(void) { HANDLE_CRASHES; DLOG(INFO) << "NP_Shutdown"; - CommandLine::Terminate(); + CommandLine::Reset(); return NPERR_NO_ERROR; } diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm index 9f497b1..769d027 100644 --- a/o3d/plugin/mac/main_mac.mm +++ b/o3d/plugin/mac/main_mac.mm @@ -687,7 +687,7 @@ NPError OSCALL NP_Shutdown(void) { stats_report::g_global_metrics.Uninitialize(); } - CommandLine::Terminate(); + CommandLine::Reset(); #ifdef CFTIMER o3d::gRenderTimer.Stop(); diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc index f658f84..9458819 100644 --- a/o3d/plugin/win/main_win.cc +++ b/o3d/plugin/win/main_win.cc @@ -739,7 +739,7 @@ NPError OSCALL NP_Shutdown(void) { stats_report::g_global_metrics.Uninitialize(); } - CommandLine::Terminate(); + CommandLine::Reset(); // TODO : This is commented out until we can determine if // it's safe to shutdown breakpad at this stage (Gears, for diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc index 463ade6..3c6ec3f 100644 --- a/webkit/tools/test_shell/run_all_tests.cc +++ b/webkit/tools/test_shell/run_all_tests.cc @@ -99,7 +99,7 @@ int main(int argc, char* argv[]) { TestShell::ShutdownTestShell(); TestShell::CleanupLogging(); - CommandLine::Terminate(); + CommandLine::Reset(); return result; } |