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

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

Issue 1624413002: Diagnose renderer-side crash with browser-side stack trace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/debug/dump_without_crashing.h"
14 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
15 #include "base/json/json_reader.h" 16 #include "base/json/json_reader.h"
16 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
17 #include "base/metrics/field_trial.h" 18 #include "base/metrics/field_trial.h"
18 #include "base/metrics/histogram.h" 19 #include "base/metrics/histogram.h"
19 #include "base/stl_util.h" 20 #include "base/stl_util.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "base/strings/utf_string_conversions.h" 22 #include "base/strings/utf_string_conversions.h"
22 #include "base/sys_info.h" 23 #include "base/sys_info.h"
23 #include "base/time/time.h" 24 #include "base/time/time.h"
(...skipping 15 matching lines...) Expand all
39 #include "content/browser/renderer_host/render_process_host_impl.h" 40 #include "content/browser/renderer_host/render_process_host_impl.h"
40 #include "content/browser/renderer_host/render_view_host_delegate.h" 41 #include "content/browser/renderer_host/render_view_host_delegate.h"
41 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 42 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
42 #include "content/browser/renderer_host/render_widget_host_view_base.h" 43 #include "content/browser/renderer_host/render_widget_host_view_base.h"
43 #include "content/common/browser_plugin/browser_plugin_messages.h" 44 #include "content/common/browser_plugin/browser_plugin_messages.h"
44 #include "content/common/content_switches_internal.h" 45 #include "content/common/content_switches_internal.h"
45 #include "content/common/drag_messages.h" 46 #include "content/common/drag_messages.h"
46 #include "content/common/frame_messages.h" 47 #include "content/common/frame_messages.h"
47 #include "content/common/input_messages.h" 48 #include "content/common/input_messages.h"
48 #include "content/common/inter_process_time_ticks_converter.h" 49 #include "content/common/inter_process_time_ticks_converter.h"
50 #include "content/common/site_isolation_policy.h"
49 #include "content/common/speech_recognition_messages.h" 51 #include "content/common/speech_recognition_messages.h"
50 #include "content/common/swapped_out_messages.h" 52 #include "content/common/swapped_out_messages.h"
51 #include "content/common/view_messages.h" 53 #include "content/common/view_messages.h"
52 #include "content/public/browser/ax_event_notification_details.h" 54 #include "content/public/browser/ax_event_notification_details.h"
53 #include "content/public/browser/browser_accessibility_state.h" 55 #include "content/public/browser/browser_accessibility_state.h"
54 #include "content/public/browser/browser_context.h" 56 #include "content/public/browser/browser_context.h"
55 #include "content/public/browser/browser_message_filter.h" 57 #include "content/public/browser/browser_message_filter.h"
56 #include "content/public/browser/content_browser_client.h" 58 #include "content/public/browser/content_browser_client.h"
57 #include "content/public/browser/focused_node_details.h" 59 #include "content/public/browser/focused_node_details.h"
58 #include "content/public/browser/native_web_keyboard_event.h" 60 #include "content/public/browser/native_web_keyboard_event.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 293
292 // The process may (if we're sharing a process with another host that already 294 // The process may (if we're sharing a process with another host that already
293 // initialized it) or may not (we have our own process or the old process 295 // initialized it) or may not (we have our own process or the old process
294 // crashed) have been initialized. Calling Init multiple times will be 296 // crashed) have been initialized. Calling Init multiple times will be
295 // ignored, so this is safe. 297 // ignored, so this is safe.
296 if (!GetProcess()->Init()) 298 if (!GetProcess()->Init())
297 return false; 299 return false;
298 DCHECK(GetProcess()->HasConnection()); 300 DCHECK(GetProcess()->HasConnection());
299 DCHECK(GetProcess()->GetBrowserContext()); 301 DCHECK(GetProcess()->GetBrowserContext());
300 CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE || 302 CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE ||
301 proxy_route_id != MSG_ROUTING_NONE); 303 proxy_route_id != MSG_ROUTING_NONE);
Charlie Reis 2016/01/25 20:29:15 Note: There's an existing set of crashes on this l
302 304
305 // If swappedout:// is disabled, we should not set both main_frame_routing_id_
306 // and proxy_route_id. Log cases that this happens (without crashing) to
307 // track down https://crbug.com/574245.
308 // TODO(creis): Remove this once we've found the cause.
309 if (SiteIsolationPolicy::IsSwappedOutStateForbidden() &&
310 main_frame_routing_id_ != MSG_ROUTING_NONE &&
311 proxy_route_id != MSG_ROUTING_NONE)
312 base::debug::DumpWithoutCrashing();
nasko 2016/01/25 21:31:48 Multiline if statement requires {}.
Charlie Reis 2016/01/25 22:07:11 As we chatted about, I think it's optional in this
313
303 GetWidget()->set_renderer_initialized(true); 314 GetWidget()->set_renderer_initialized(true);
304 315
305 // Ensure the RenderView starts with a next_page_id larger than any existing 316 // Ensure the RenderView starts with a next_page_id larger than any existing
306 // page ID it might be asked to render. 317 // page ID it might be asked to render.
307 int32_t next_page_id = 1; 318 int32_t next_page_id = 1;
308 if (max_page_id > -1) 319 if (max_page_id > -1)
309 next_page_id = max_page_id + 1; 320 next_page_id = max_page_id + 1;
310 321
311 ViewMsg_New_Params params; 322 ViewMsg_New_Params params;
312 params.renderer_preferences = 323 params.renderer_preferences =
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 } else { 1398 } else {
1388 render_view_ready_on_process_launch_ = true; 1399 render_view_ready_on_process_launch_ = true;
1389 } 1400 }
1390 } 1401 }
1391 1402
1392 void RenderViewHostImpl::RenderViewReady() { 1403 void RenderViewHostImpl::RenderViewReady() {
1393 delegate_->RenderViewReady(this); 1404 delegate_->RenderViewReady(this);
1394 } 1405 }
1395 1406
1396 } // namespace content 1407 } // 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