From 8398bf1ecf03e2311da788058703fdf7b67b1064 Mon Sep 17 00:00:00 2001 From: "weitaosu@chromium.org" Date: Thu, 26 Jun 2014 21:11:34 +0000 Subject: The LOG initialization code would clear the last error. Use PLOG instead. LOG(...) needs to perform log initialization when called for the first time. It may call Windows APIs that clears the last error in which case the message written to the log will contain the wrong last error code. PLOG does the right thing by getting the last error code before initialing the log file. BUG= Review URL: https://codereview.chromium.org/331883009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280103 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_channel_win.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ipc') diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc index 4023097..2f6bc9b 100644 --- a/ipc/ipc_channel_win.cc +++ b/ipc/ipc_channel_win.cc @@ -265,9 +265,8 @@ bool ChannelWin::CreatePipe(const IPC::ChannelHandle &channel_handle, if (pipe_ == INVALID_HANDLE_VALUE) { // If this process is being closed, the pipe may be gone already. - LOG(WARNING) << "Unable to create pipe \"" << pipe_name << - "\" in " << (mode & MODE_SERVER_FLAG ? "server" : "client") - << " mode. Error :" << GetLastError(); + PLOG(WARNING) << "Unable to create pipe \"" << pipe_name << "\" in " + << (mode & MODE_SERVER_FLAG ? "server" : "client") << " mode"; return false; } -- cgit v1.1