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

Side by Side Diff: content/browser/renderer_host/browser_render_process_host.cc

Issue 8004001: Fix for a crash in ChildProcessLauncher::GetChildTerminationStatus (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 | « 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/browser_render_process_host.h" 8 #include "content/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 } 837 }
838 } 838 }
839 #endif 839 #endif
840 ProcessDied(status, exit_code, false); 840 ProcessDied(status, exit_code, false);
841 } 841 }
842 842
843 // Called when the renderer process handle has been signaled. 843 // Called when the renderer process handle has been signaled.
844 void BrowserRenderProcessHost::OnWaitableEventSignaled( 844 void BrowserRenderProcessHost::OnWaitableEventSignaled(
845 base::WaitableEvent* waitable_event) { 845 base::WaitableEvent* waitable_event) {
846 #if defined (OS_WIN) 846 #if defined (OS_WIN)
847 DCHECK(child_process_launcher_.get());
848 int exit_code = 0; 847 int exit_code = 0;
849 base::TerminationStatus status = 848 base::TerminationStatus status =
850 child_process_launcher_->GetChildTerminationStatus(&exit_code); 849 base::GetTerminationStatus(waitable_event->Release(), &exit_code);
850 delete waitable_event;
851 ProcessDied(status, exit_code, true); 851 ProcessDied(status, exit_code, true);
852 #endif 852 #endif
853 } 853 }
854 854
855 void BrowserRenderProcessHost::ProcessDied( 855 void BrowserRenderProcessHost::ProcessDied(
856 base::TerminationStatus status, int exit_code, bool was_alive) { 856 base::TerminationStatus status, int exit_code, bool was_alive) {
857 // Our child process has died. If we didn't expect it, it's a crash. 857 // Our child process has died. If we didn't expect it, it's a crash.
858 // In any case, we need to let everyone know it's gone. 858 // In any case, we need to let everyone know it's gone.
859 // The OnChannelError notification can fire multiple times due to nested sync 859 // The OnChannelError notification can fire multiple times due to nested sync
860 // calls to a renderer. If we don't have a valid channel here it means we 860 // calls to a renderer. If we don't have a valid channel here it means we
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) { 990 void BrowserRenderProcessHost::OnRevealFolderInOS(const FilePath& path) {
991 // Only honor the request if appropriate persmissions are granted. 991 // Only honor the request if appropriate persmissions are granted.
992 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path)) 992 if (ChildProcessSecurityPolicy::GetInstance()->CanReadFile(id(), path))
993 content::GetContentClient()->browser()->OpenItem(path); 993 content::GetContentClient()->browser()->OpenItem(path);
994 } 994 }
995 995
996 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) { 996 void BrowserRenderProcessHost::OnSavedPageAsMHTML(int job_id, bool success) {
997 content::GetContentClient()->browser()->GetMHTMLGenerationManager()-> 997 content::GetContentClient()->browser()->GetMHTMLGenerationManager()->
998 MHTMLGenerated(job_id, success); 998 MHTMLGenerated(job_id, success);
999 } 999 }
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