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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 2713743002: Remove DumpWithoutCrashing calls for empty PageState. (Closed)
Patch Set: Leave DCHECKs behind. Created 3 years, 9 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 | content/browser/frame_host/navigation_entry_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 /* 5 /*
6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * 10 *
(...skipping 21 matching lines...) Expand all
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36 #include "content/browser/frame_host/navigation_controller_impl.h" 36 #include "content/browser/frame_host/navigation_controller_impl.h"
37 37
38 #include <utility> 38 #include <utility>
39 39
40 #include "base/bind.h" 40 #include "base/bind.h"
41 #include "base/command_line.h" 41 #include "base/command_line.h"
42 #include "base/debug/dump_without_crashing.h"
43 #include "base/logging.h" 42 #include "base/logging.h"
44 #include "base/memory/ptr_util.h" 43 #include "base/memory/ptr_util.h"
45 #include "base/metrics/histogram_macros.h" 44 #include "base/metrics/histogram_macros.h"
46 #include "base/strings/string_number_conversions.h" // Temporary 45 #include "base/strings/string_number_conversions.h" // Temporary
47 #include "base/strings/string_util.h" 46 #include "base/strings/string_util.h"
48 #include "base/strings/utf_string_conversions.h" 47 #include "base/strings/utf_string_conversions.h"
49 #include "base/time/time.h" 48 #include "base/time/time.h"
50 #include "base/trace_event/trace_event.h" 49 #include "base/trace_event/trace_event.h"
51 #include "build/build_config.h" 50 #include "build/build_config.h"
52 #include "cc/base/switches.h" 51 #include "cc/base/switches.h"
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 time_smoother_.GetSmoothedTime(get_timestamp_callback_.Run()); 896 time_smoother_.GetSmoothedTime(get_timestamp_callback_.Run());
898 DVLOG(1) << "Navigation finished at (smoothed) timestamp " 897 DVLOG(1) << "Navigation finished at (smoothed) timestamp "
899 << timestamp.ToInternalValue(); 898 << timestamp.ToInternalValue();
900 899
901 // We should not have a pending entry anymore. Clear it again in case any 900 // We should not have a pending entry anymore. Clear it again in case any
902 // error cases above forgot to do so. 901 // error cases above forgot to do so.
903 DiscardNonCommittedEntriesInternal(); 902 DiscardNonCommittedEntriesInternal();
904 903
905 // All committed entries should have nonempty content state so WebKit doesn't 904 // All committed entries should have nonempty content state so WebKit doesn't
906 // get confused when we go back to them (see the function for details). 905 // get confused when we go back to them (see the function for details).
907 if (!params.page_state.IsValid()) { 906 DCHECK(params.page_state.IsValid()) << "Shouldn't see an empty PageState.";
908 // Temporarily generate a minidump to diagnose https://crbug.com/568703.
909 base::debug::DumpWithoutCrashing();
910 NOTREACHED() << "Shouldn't see an empty PageState at commit.";
911 }
912 NavigationEntryImpl* active_entry = GetLastCommittedEntry(); 907 NavigationEntryImpl* active_entry = GetLastCommittedEntry();
913 active_entry->SetTimestamp(timestamp); 908 active_entry->SetTimestamp(timestamp);
914 active_entry->SetHttpStatusCode(params.http_status_code); 909 active_entry->SetHttpStatusCode(params.http_status_code);
915 910
916 FrameNavigationEntry* frame_entry = 911 FrameNavigationEntry* frame_entry =
917 active_entry->GetFrameEntry(rfh->frame_tree_node()); 912 active_entry->GetFrameEntry(rfh->frame_tree_node());
918 // Update the frame-specific PageState and RedirectChain 913 // Update the frame-specific PageState and RedirectChain
919 // We may not find a frame_entry in some cases; ignore the PageState if so. 914 // We may not find a frame_entry in some cases; ignore the PageState if so.
920 // TODO(creis): Remove the "if" once https://crbug.com/522193 is fixed. 915 // TODO(creis): Remove the "if" once https://crbug.com/522193 is fixed.
921 if (frame_entry) { 916 if (frame_entry) {
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2155 } 2150 }
2156 } 2151 }
2157 } 2152 }
2158 2153
2159 void NavigationControllerImpl::SetGetTimestampCallbackForTest( 2154 void NavigationControllerImpl::SetGetTimestampCallbackForTest(
2160 const base::Callback<base::Time()>& get_timestamp_callback) { 2155 const base::Callback<base::Time()>& get_timestamp_callback) {
2161 get_timestamp_callback_ = get_timestamp_callback; 2156 get_timestamp_callback_ = get_timestamp_callback;
2162 } 2157 }
2163 2158
2164 } // namespace content 2159 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698