summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_win.cc
diff options
context:
space:
mode:
authorweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-26 21:11:34 +0000
committerweitaosu@chromium.org <weitaosu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-26 21:11:34 +0000
commit8398bf1ecf03e2311da788058703fdf7b67b1064 (patch)
treeee247e1041f234d344d61080e8f1e539aab2fae9 /ipc/ipc_channel_win.cc
parent6d885c6e9c2a053b0b6d9317b58e12c404a4536d (diff)
downloadchromium_src-8398bf1ecf03e2311da788058703fdf7b67b1064.zip
chromium_src-8398bf1ecf03e2311da788058703fdf7b67b1064.tar.gz
chromium_src-8398bf1ecf03e2311da788058703fdf7b67b1064.tar.bz2
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
Diffstat (limited to 'ipc/ipc_channel_win.cc')
-rw-r--r--ipc/ipc_channel_win.cc5
1 files changed, 2 insertions, 3 deletions
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;
}