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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 883503003: Remove CHECKs from WebContentsImpl::OnDocumentLoadedInFrame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 2745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent")); 2756 RecordAction(base::UserMetricsAction("SSL.RanInsecureContent"));
2757 if (EndsWith(security_origin, kDotGoogleDotCom, false)) 2757 if (EndsWith(security_origin, kDotGoogleDotCom, false))
2758 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle")); 2758 RecordAction(base::UserMetricsAction("SSL.RanInsecureContentGoogle"));
2759 controller_.ssl_manager()->DidRunInsecureContent(security_origin); 2759 controller_.ssl_manager()->DidRunInsecureContent(security_origin);
2760 displayed_insecure_content_ = true; 2760 displayed_insecure_content_ = true;
2761 SSLManager::NotifySSLInternalStateChanged( 2761 SSLManager::NotifySSLInternalStateChanged(
2762 GetController().GetBrowserContext()); 2762 GetController().GetBrowserContext());
2763 } 2763 }
2764 2764
2765 void WebContentsImpl::OnDocumentLoadedInFrame() { 2765 void WebContentsImpl::OnDocumentLoadedInFrame() {
2766 CHECK(render_frame_message_source_); 2766 if (!render_frame_message_source_) {
2767 CHECK(!render_view_message_source_); 2767 RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD2"));
Charlie Reis 2015/01/27 00:18:03 Why RVD2? I thought we usually abbreviated the cl
nasko 2015/01/27 01:29:37 Fixed both. I forgot it on the first iteration.
2768 // TODO(nasko): With --site-per-process, subframes can be in a different
2769 // process from the main frame and this will kill the wrong process.
2770 // Once RenderViewHost is not used to route messages, this should not
2771 // happen.
Charlie Reis 2015/01/27 00:18:03 I don't think this TODO is necessary. "!render_fr
nasko 2015/01/27 01:29:36 Done.
2772 GetRenderProcessHost()->ReceivedBadMessage();
2773 return;
2774 }
2775
2768 RenderFrameHostImpl* rfh = 2776 RenderFrameHostImpl* rfh =
2769 static_cast<RenderFrameHostImpl*>(render_frame_message_source_); 2777 static_cast<RenderFrameHostImpl*>(render_frame_message_source_);
2770 FOR_EACH_OBSERVER( 2778 FOR_EACH_OBSERVER(
2771 WebContentsObserver, observers_, DocumentLoadedInFrame(rfh)); 2779 WebContentsObserver, observers_, DocumentLoadedInFrame(rfh));
2772 } 2780 }
2773 2781
2774 void WebContentsImpl::OnDidFinishLoad( 2782 void WebContentsImpl::OnDidFinishLoad(
2775 const GURL& url) { 2783 const GURL& url) {
2776 if (!render_frame_message_source_) { 2784 if (!render_frame_message_source_) {
2777 RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD2")); 2785 RecordAction(base::UserMetricsAction("BadMessageTerminate_RVD2"));
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
4450 node->render_manager()->ResumeResponseDeferredAtStart(); 4458 node->render_manager()->ResumeResponseDeferredAtStart();
4451 } 4459 }
4452 4460
4453 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4461 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4454 force_disable_overscroll_content_ = force_disable; 4462 force_disable_overscroll_content_ = force_disable;
4455 if (view_) 4463 if (view_)
4456 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4464 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4457 } 4465 }
4458 4466
4459 } // namespace content 4467 } // 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