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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1643673002: Diagnose RenderFrameImpl::didCommitProvisionalLoad crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « content/renderer/render_thread_impl.cc ('k') | 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/debug/alias.h" 15 #include "base/debug/alias.h"
16 #include "base/debug/crash_logging.h"
16 #include "base/files/file_path.h" 17 #include "base/files/file_path.h"
17 #include "base/i18n/rtl.h" 18 #include "base/i18n/rtl.h"
18 #include "base/json/json_writer.h" 19 #include "base/json/json_writer.h"
19 #include "base/lazy_instance.h" 20 #include "base/lazy_instance.h"
20 #include "base/memory/scoped_ptr.h" 21 #include "base/memory/scoped_ptr.h"
21 #include "base/metrics/field_trial.h" 22 #include "base/metrics/field_trial.h"
22 #include "base/metrics/histogram.h" 23 #include "base/metrics/histogram.h"
23 #include "base/process/kill.h" 24 #include "base/process/kill.h"
24 #include "base/process/process.h" 25 #include "base/process/process.h"
25 #include "base/strings/string_number_conversions.h" 26 #include "base/strings/string_number_conversions.h"
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 676
676 g_view_map.Get().insert(std::make_pair(webview(), this)); 677 g_view_map.Get().insert(std::make_pair(webview(), this));
677 g_routing_id_view_map.Get().insert(std::make_pair(routing_id(), this)); 678 g_routing_id_view_map.Get().insert(std::make_pair(routing_id(), this));
678 679
679 const base::CommandLine& command_line = 680 const base::CommandLine& command_line =
680 *base::CommandLine::ForCurrentProcess(); 681 *base::CommandLine::ForCurrentProcess();
681 682
682 if (command_line.HasSwitch(switches::kStatsCollectionController)) 683 if (command_line.HasSwitch(switches::kStatsCollectionController))
683 stats_collection_observer_.reset(new StatsCollectionObserver(this)); 684 stats_collection_observer_.reset(new StatsCollectionObserver(this));
684 685
686 // Debug cases of https://crbug.com/575245.
687 base::debug::SetCrashKeyValue("rvinit_view_id",
688 base::IntToString(routing_id()));
689 base::debug::SetCrashKeyValue("rvinit_proxy_id",
690 base::IntToString(params.proxy_routing_id));
691 base::debug::SetCrashKeyValue(
692 "rvinit_main_frame_id", base::IntToString(params.main_frame_routing_id));
693
685 if (params.main_frame_routing_id != MSG_ROUTING_NONE) { 694 if (params.main_frame_routing_id != MSG_ROUTING_NONE) {
686 main_render_frame_ = RenderFrameImpl::CreateMainFrame( 695 main_render_frame_ = RenderFrameImpl::CreateMainFrame(
687 this, params.main_frame_routing_id, params.main_frame_widget_routing_id, 696 this, params.main_frame_routing_id, params.main_frame_widget_routing_id,
688 params.hidden, screen_info(), compositor_deps_); 697 params.hidden, screen_info(), compositor_deps_);
689 } 698 }
690 699
691 if (params.proxy_routing_id != MSG_ROUTING_NONE) { 700 if (params.proxy_routing_id != MSG_ROUTING_NONE) {
692 CHECK(params.swapped_out); 701 CHECK(params.swapped_out);
693 if (main_render_frame_) { 702 if (main_render_frame_) {
694 DCHECK(!SiteIsolationPolicy::IsSwappedOutStateForbidden()); 703 DCHECK(!SiteIsolationPolicy::IsSwappedOutStateForbidden());
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after
3727 if (IsUseZoomForDSFEnabled()) { 3736 if (IsUseZoomForDSFEnabled()) {
3728 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3737 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3729 } else { 3738 } else {
3730 webview()->setDeviceScaleFactor(device_scale_factor_); 3739 webview()->setDeviceScaleFactor(device_scale_factor_);
3731 } 3740 }
3732 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3741 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3733 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3742 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3734 } 3743 }
3735 3744
3736 } // namespace content 3745 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698