Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1630)

Side by Side Diff: sandbox/win/src/handle_closer_agent.cc

Issue 2484813005: Remove DCHECK when handle stuffing fails. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sandbox/win/src/handle_closer_agent.h" 5 #include "sandbox/win/src/handle_closer_agent.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 break; 78 break;
79 if (dup_dummy != closed_handle) 79 if (dup_dummy != closed_handle)
80 to_close.push_back(dup_dummy); 80 to_close.push_back(dup_dummy);
81 } while (count-- && 81 } while (count-- &&
82 reinterpret_cast<uintptr_t>(dup_dummy) < 82 reinterpret_cast<uintptr_t>(dup_dummy) <
83 reinterpret_cast<uintptr_t>(closed_handle)); 83 reinterpret_cast<uintptr_t>(closed_handle));
84 84
85 for (HANDLE h : to_close) 85 for (HANDLE h : to_close)
86 ::CloseHandle(h); 86 ::CloseHandle(h);
87 87
88 // Useful to know when we're not able to stuff handles. 88 // TODO(wfh): Investigate why stuffing handles sometimes fails.
89 DCHECK(dup_dummy == closed_handle); 89 // http://crbug.com/649904
90
91 return dup_dummy == closed_handle; 90 return dup_dummy == closed_handle;
92 } 91 }
93 92
94 // Reads g_handles_to_close and creates the lookup map. 93 // Reads g_handles_to_close and creates the lookup map.
95 void HandleCloserAgent::InitializeHandlesToClose(bool* is_csrss_connected) { 94 void HandleCloserAgent::InitializeHandlesToClose(bool* is_csrss_connected) {
96 CHECK(g_handles_to_close != NULL); 95 CHECK(g_handles_to_close != NULL);
97 96
98 // Default to connected state 97 // Default to connected state
99 *is_csrss_connected = true; 98 *is_csrss_connected = true;
100 99
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return false; 193 return false;
195 // Attempt to stuff this handle with a new dummy Event. 194 // Attempt to stuff this handle with a new dummy Event.
196 AttemptToStuffHandleSlot(handle, result->first); 195 AttemptToStuffHandleSlot(handle, result->first);
197 } 196 }
198 } 197 }
199 198
200 return true; 199 return true;
201 } 200 }
202 201
203 } // namespace sandbox 202 } // namespace sandbox
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698