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

Side by Side Diff: chrome/common/child_process_host.cc

Issue 195067: Turn NULL used as int to 0.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « base/stats_table_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/common/child_process_host.h" 5 #include "chrome/common/child_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 bool did_crash = base::DidProcessCrash(NULL, handle()); 198 bool did_crash = base::DidProcessCrash(NULL, handle());
199 if (did_crash) { 199 if (did_crash) {
200 // Report that this child process crashed. 200 // Report that this child process crashed.
201 Notify(NotificationType::CHILD_PROCESS_CRASHED); 201 Notify(NotificationType::CHILD_PROCESS_CRASHED);
202 } 202 }
203 // Notify in the main loop of the disconnection. 203 // Notify in the main loop of the disconnection.
204 Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED); 204 Notify(NotificationType::CHILD_PROCESS_HOST_DISCONNECTED);
205 205
206 // On POSIX, once we've called DidProcessCrash, handle() is no longer 206 // On POSIX, once we've called DidProcessCrash, handle() is no longer
207 // valid. Ensure the destructor doesn't try to use it. 207 // valid. Ensure the destructor doesn't try to use it.
208 set_handle(NULL); 208 set_handle(base::kNullProcessHandle);
209 209
210 delete this; 210 delete this;
211 } 211 }
212 212
213 ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host) 213 ChildProcessHost::ListenerHook::ListenerHook(ChildProcessHost* host)
214 : host_(host) { 214 : host_(host) {
215 } 215 }
216 216
217 void ChildProcessHost::ListenerHook::OnMessageReceived( 217 void ChildProcessHost::ListenerHook::OnMessageReceived(
218 const IPC::Message& msg) { 218 const IPC::Message& msg) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 return *iterator_; 306 return *iterator_;
307 } while (true); 307 } while (true);
308 308
309 return NULL; 309 return NULL;
310 } 310 }
311 311
312 bool ChildProcessHost::Iterator::Done() { 312 bool ChildProcessHost::Iterator::Done() {
313 return iterator_ == Singleton<ChildProcessList>::get()->end(); 313 return iterator_ == Singleton<ChildProcessList>::get()->end();
314 } 314 }
OLDNEW
« no previous file with comments | « base/stats_table_unittest.cc ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698