summaryrefslogtreecommitdiffstats
path: root/ipc/ipc_channel_win.cc
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-10-06 14:46:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-06 21:47:36 +0000
commitf81b10abe42e0d104df901eed2b6082f211462b1 (patch)
treedfa06e90024545785bd92068fa6e104ca35e7b48 /ipc/ipc_channel_win.cc
parent63d155b865a05b2681e21c72fb1c0789793d8473 (diff)
downloadchromium_src-f81b10abe42e0d104df901eed2b6082f211462b1.zip
chromium_src-f81b10abe42e0d104df901eed2b6082f211462b1.tar.gz
chromium_src-f81b10abe42e0d104df901eed2b6082f211462b1.tar.bz2
ipc: Plumbing for attachment brokering in ChannelPosix.
Add attachment brokering plumbing to ChannelPosix. BUG=535711 Review URL: https://codereview.chromium.org/1387973002 Cr-Commit-Position: refs/heads/master@{#352693}
Diffstat (limited to 'ipc/ipc_channel_win.cc')
-rw-r--r--ipc/ipc_channel_win.cc16
1 files changed, 13 insertions, 3 deletions
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index e758d94..c04f0c6 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -161,7 +161,17 @@ void ChannelWin::FlushPrelimQueue() {
while (!prelim_queue.empty()) {
Message* m = prelim_queue.front();
- ProcessMessageForDelivery(m);
+ bool success = ProcessMessageForDelivery(m);
+ prelim_queue.pop();
+
+ if (!success)
+ break;
+ }
+
+ // Delete any unprocessed messages.
+ while (!prelim_queue.empty()) {
+ Message* m = prelim_queue.front();
+ delete m;
prelim_queue.pop();
}
}
@@ -254,9 +264,9 @@ void ChannelWin::HandleInternalMessage(const Message& msg) {
// Validation completed.
validate_client_ = false;
- FlushPrelimQueue();
-
listener()->OnChannelConnected(claimed_pid);
+
+ FlushPrelimQueue();
}
base::ProcessId ChannelWin::GetSenderPID() {