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

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

Issue 2915813002: Add missing return statement after ReceivedBadMessage call. (Closed)
Patch Set: Created 3 years, 6 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
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 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3135 // May be in case of IPC error, if it takes long time for renderer 3135 // May be in case of IPC error, if it takes long time for renderer
3136 // to exit. Child process will be killed in any case during 3136 // to exit. Child process will be killed in any case during
3137 // child_process_launcher_.reset(). Make sure we will not broadcast 3137 // child_process_launcher_.reset(). Make sure we will not broadcast
3138 // FrameHostMsg_RenderProcessGone with status 3138 // FrameHostMsg_RenderProcessGone with status
3139 // TERMINATION_STATUS_STILL_RUNNING, since this will break WebContentsImpl 3139 // TERMINATION_STATUS_STILL_RUNNING, since this will break WebContentsImpl
3140 // logic. 3140 // logic.
3141 status = base::TERMINATION_STATUS_PROCESS_CRASHED; 3141 status = base::TERMINATION_STATUS_PROCESS_CRASHED;
3142 } 3142 }
3143 } 3143 }
3144 3144
3145 if (exit_code == RESULT_CODE_KILLED_BAD_MESSAGE) {
3146 // If a renderer sent a bad message, then revoke all the capabilities it was
3147 // previously given.
3148 // http://crbug.com/726142
3149 ChildProcessSecurityPolicyImpl::GetInstance()->Remove(id_);
3150 ChildProcessSecurityPolicyImpl::GetInstance()->Add(id_);
3151 }
3152
3145 RendererClosedDetails details(status, exit_code); 3153 RendererClosedDetails details(status, exit_code);
3146 3154
3147 child_process_launcher_.reset(); 3155 child_process_launcher_.reset();
3148 is_dead_ = true; 3156 is_dead_ = true;
3149 if (route_provider_binding_.is_bound()) 3157 if (route_provider_binding_.is_bound())
3150 route_provider_binding_.Close(); 3158 route_provider_binding_.Close();
3151 associated_interfaces_.reset(); 3159 associated_interfaces_.reset();
3152 ResetChannelProxy(); 3160 ResetChannelProxy();
3153 3161
3154 UpdateProcessPriority(); 3162 UpdateProcessPriority();
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
3574 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; 3582 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error;
3575 3583
3576 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. 3584 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing.
3577 // Capture the error message in a crash key value. 3585 // Capture the error message in a crash key value.
3578 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); 3586 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error);
3579 bad_message::ReceivedBadMessage(render_process_id, 3587 bad_message::ReceivedBadMessage(render_process_id,
3580 bad_message::RPH_MOJO_PROCESS_ERROR); 3588 bad_message::RPH_MOJO_PROCESS_ERROR);
3581 } 3589 }
3582 3590
3583 } // namespace content 3591 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698