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

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

Issue 2652573002: 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 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 // TERMINATION_STATUS_STILL_RUNNING, since this will break WebContentsImpl 2693 // TERMINATION_STATUS_STILL_RUNNING, since this will break WebContentsImpl
2694 // logic. 2694 // logic.
2695 status = base::TERMINATION_STATUS_PROCESS_CRASHED; 2695 status = base::TERMINATION_STATUS_PROCESS_CRASHED;
2696 } 2696 }
2697 } 2697 }
2698 2698
2699 RendererClosedDetails details(status, exit_code); 2699 RendererClosedDetails details(status, exit_code);
2700 2700
2701 child_process_launcher_.reset(); 2701 child_process_launcher_.reset();
2702 is_dead_ = true; 2702 is_dead_ = true;
2703 if (route_provider_binding_.is_bound())
2704 route_provider_binding_.Close();
2703 ResetChannelProxy(); 2705 ResetChannelProxy();
2704 2706
2705 UpdateProcessPriority(); 2707 UpdateProcessPriority();
2706 DCHECK(!is_process_backgrounded_); 2708 DCHECK(!is_process_backgrounded_);
2707 2709
2708 within_process_died_observer_ = true; 2710 within_process_died_observer_ = true;
2709 NotificationService::current()->Notify( 2711 NotificationService::current()->Notify(
2710 NOTIFICATION_RENDERER_PROCESS_CLOSED, Source<RenderProcessHost>(this), 2712 NOTIFICATION_RENDERER_PROCESS_CLOSED, Source<RenderProcessHost>(this),
2711 Details<RendererClosedDetails>(&details)); 2713 Details<RendererClosedDetails>(&details));
2712 for (auto& observer : observers_) 2714 for (auto& observer : observers_)
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3041 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3040 3042
3041 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3043 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3042 // Capture the error message in a crash key value. 3044 // Capture the error message in a crash key value.
3043 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3045 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3044 bad_message::ReceivedBadMessage(render_process_id, 3046 bad_message::ReceivedBadMessage(render_process_id,
3045 bad_message::RPH_MOJO_PROCESS_ERROR); 3047 bad_message::RPH_MOJO_PROCESS_ERROR);
3046 } 3048 }
3047 3049
3048 } // namespace content 3050 } // 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