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

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

Issue 2572573003: Remove old diagnostic crash reports. (Closed)
Patch Set: Preserve routing ID. Created 4 years 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 (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/debug/dump_without_crashing.h"
alexmos 2016/12/13 20:28:55 Can this be removed now?
Charlie Reis 2017/05/09 16:42:25 Done.
15 #include "base/feature_list.h" 15 #include "base/feature_list.h"
16 #include "base/i18n/rtl.h" 16 #include "base/i18n/rtl.h"
17 #include "base/json/json_reader.h" 17 #include "base/json/json_reader.h"
18 #include "base/message_loop/message_loop.h" 18 #include "base/message_loop/message_loop.h"
19 #include "base/metrics/field_trial.h" 19 #include "base/metrics/field_trial.h"
20 #include "base/metrics/histogram_macros.h" 20 #include "base/metrics/histogram_macros.h"
21 #include "base/stl_util.h" 21 #include "base/stl_util.h"
22 #include "base/strings/string_number_conversions.h" 22 #include "base/strings/string_number_conversions.h"
23 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
24 #include "base/strings/utf_string_conversions.h" 24 #include "base/strings/utf_string_conversions.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 // initialized it) or may not (we have our own process or the old process 269 // initialized it) or may not (we have our own process or the old process
270 // crashed) have been initialized. Calling Init multiple times will be 270 // crashed) have been initialized. Calling Init multiple times will be
271 // ignored, so this is safe. 271 // ignored, so this is safe.
272 if (!GetProcess()->Init()) 272 if (!GetProcess()->Init())
273 return false; 273 return false;
274 DCHECK(GetProcess()->HasConnection()); 274 DCHECK(GetProcess()->HasConnection());
275 DCHECK(GetProcess()->GetBrowserContext()); 275 DCHECK(GetProcess()->GetBrowserContext());
276 CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE || 276 CHECK(main_frame_routing_id_ != MSG_ROUTING_NONE ||
277 proxy_route_id != MSG_ROUTING_NONE); 277 proxy_route_id != MSG_ROUTING_NONE);
278 278
279 // We should not set both main_frame_routing_id_ and proxy_route_id. Log
280 // cases that this happens (without crashing) to track down
281 // https://crbug.com/575245.
282 // TODO(creis): Remove this once we've found the cause.
283 if (main_frame_routing_id_ != MSG_ROUTING_NONE &&
284 proxy_route_id != MSG_ROUTING_NONE)
alexmos 2016/12/13 20:28:55 Would there be value in keeping this as a DCHECK?
Charlie Reis 2017/05/09 16:42:26 Sure, we can keep it as a DCHECK here.
285 base::debug::DumpWithoutCrashing();
286
287 GetWidget()->set_renderer_initialized(true); 279 GetWidget()->set_renderer_initialized(true);
288 280
289 mojom::CreateViewParamsPtr params = mojom::CreateViewParams::New(); 281 mojom::CreateViewParamsPtr params = mojom::CreateViewParams::New();
290 params->renderer_preferences = 282 params->renderer_preferences =
291 delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); 283 delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext());
292 GetPlatformSpecificPrefs(&params->renderer_preferences); 284 GetPlatformSpecificPrefs(&params->renderer_preferences);
293 params->web_preferences = GetWebkitPreferences(); 285 params->web_preferences = GetWebkitPreferences();
294 params->view_id = GetRoutingID(); 286 params->view_id = GetRoutingID();
295 params->main_frame_routing_id = main_frame_routing_id_; 287 params->main_frame_routing_id = main_frame_routing_id_;
296 if (main_frame_routing_id_ != MSG_ROUTING_NONE) { 288 if (main_frame_routing_id_ != MSG_ROUTING_NONE) {
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 } else { 1080 } else {
1089 render_view_ready_on_process_launch_ = true; 1081 render_view_ready_on_process_launch_ = true;
1090 } 1082 }
1091 } 1083 }
1092 1084
1093 void RenderViewHostImpl::RenderViewReady() { 1085 void RenderViewHostImpl::RenderViewReady() {
1094 delegate_->RenderViewReady(this); 1086 delegate_->RenderViewReady(this);
1095 } 1087 }
1096 1088
1097 } // namespace content 1089 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698