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

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

Issue 2653133002: Close browser RouterProvider binding on renderer death (Closed)
Patch Set: Created 3 years, 11 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
« 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // 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/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2678 // TERMINATION_STATUS_STILL_RUNNING, since this will break WebContentsImpl 2678 // TERMINATION_STATUS_STILL_RUNNING, since this will break WebContentsImpl
2679 // logic. 2679 // logic.
2680 status = base::TERMINATION_STATUS_PROCESS_CRASHED; 2680 status = base::TERMINATION_STATUS_PROCESS_CRASHED;
2681 } 2681 }
2682 } 2682 }
2683 2683
2684 RendererClosedDetails details(status, exit_code); 2684 RendererClosedDetails details(status, exit_code);
2685 2685
2686 child_process_launcher_.reset(); 2686 child_process_launcher_.reset();
2687 is_dead_ = true; 2687 is_dead_ = true;
2688 if (route_provider_binding_.is_bound())
2689 route_provider_binding_.Close();
2688 ResetChannelProxy(); 2690 ResetChannelProxy();
2689 2691
2690 UpdateProcessPriority(); 2692 UpdateProcessPriority();
2691 DCHECK(!is_process_backgrounded_); 2693 DCHECK(!is_process_backgrounded_);
2692 2694
2693 within_process_died_observer_ = true; 2695 within_process_died_observer_ = true;
2694 NotificationService::current()->Notify( 2696 NotificationService::current()->Notify(
2695 NOTIFICATION_RENDERER_PROCESS_CLOSED, Source<RenderProcessHost>(this), 2697 NOTIFICATION_RENDERER_PROCESS_CLOSED, Source<RenderProcessHost>(this),
2696 Details<RendererClosedDetails>(&details)); 2698 Details<RendererClosedDetails>(&details));
2697 for (auto& observer : observers_) 2699 for (auto& observer : observers_)
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3026 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3025 3027
3026 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3028 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3027 // Capture the error message in a crash key value. 3029 // Capture the error message in a crash key value.
3028 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3030 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3029 bad_message::ReceivedBadMessage(render_process_id, 3031 bad_message::ReceivedBadMessage(render_process_id,
3030 bad_message::RPH_MOJO_PROCESS_ERROR); 3032 bad_message::RPH_MOJO_PROCESS_ERROR);
3031 } 3033 }
3032 3034
3033 } // namespace content 3035 } // namespace content
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