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

Side by Side Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc

Issue 2194893003: Remove NOTREACHED that gets hit for non well formed xhtml. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add test Created 4 years, 4 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 | chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" 5 #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return false; 149 return false;
150 } 150 }
151 151
152 if (!EventsInOrder(timing.dom_loading, timing.first_layout)) { 152 if (!EventsInOrder(timing.dom_loading, timing.first_layout)) {
153 NOTREACHED() << "Invalid dom_loading " << timing.dom_loading 153 NOTREACHED() << "Invalid dom_loading " << timing.dom_loading
154 << " for first_layout " << timing.first_layout; 154 << " for first_layout " << timing.first_layout;
155 return false; 155 return false;
156 } 156 }
157 157
158 if (!EventsInOrder(timing.first_layout, timing.first_paint)) { 158 if (!EventsInOrder(timing.first_layout, timing.first_paint)) {
159 NOTREACHED() << "Invalid first_layout " << timing.first_layout 159 // This can happen when we process an XHTML document that doesn't contain
160 << " for first_paint " << timing.first_paint; 160 // well formed XML. See crbug.com/627607.
161 DLOG(ERROR) << "Invalid first_layout " << timing.first_layout
162 << " for first_paint " << timing.first_paint;
161 return false; 163 return false;
162 } 164 }
163 165
164 if (!EventsInOrder(timing.first_paint, timing.first_text_paint)) { 166 if (!EventsInOrder(timing.first_paint, timing.first_text_paint)) {
165 NOTREACHED() << "Invalid first_paint " << timing.first_paint 167 NOTREACHED() << "Invalid first_paint " << timing.first_paint
166 << " for first_text_paint " << timing.first_text_paint; 168 << " for first_text_paint " << timing.first_text_paint;
167 return false; 169 return false;
168 } 170 }
169 171
170 if (!EventsInOrder(timing.first_paint, timing.first_image_paint)) { 172 if (!EventsInOrder(timing.first_paint, timing.first_image_paint)) {
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage()) 954 if (navigation_handle->IsSamePage() || navigation_handle->IsErrorPage())
953 return false; 955 return false;
954 const std::string& mime_type = web_contents()->GetContentsMimeType(); 956 const std::string& mime_type = web_contents()->GetContentsMimeType();
955 if (mime_type != "text/html" && mime_type != "application/xhtml+xml") 957 if (mime_type != "text/html" && mime_type != "application/xhtml+xml")
956 return false; 958 return false;
957 } 959 }
958 return true; 960 return true;
959 } 961 }
960 962
961 } // namespace page_load_metrics 963 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/observers/core_page_load_metrics_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698