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

Unified Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 807583006: Fix ChromeRenderViewObserver::DidStopLoading to be OOPIF compatible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return early for remote frames. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_view_observer.cc
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc
index a2e1b9aecc961cc413ebc94187a186cdd02103b8..541115dcd84b12a07fb20815a876f4a5fa003077 100644
--- a/chrome/renderer/chrome_render_view_observer.cc
+++ b/chrome/renderer/chrome_render_view_observer.cc
@@ -334,6 +334,11 @@ void ChromeRenderViewObserver::DidStartLoading() {
void ChromeRenderViewObserver::DidStopLoading() {
WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
+
+ // Remote frames don't host a document, so return early if that's the case.
+ if (main_frame->isWebRemoteFrame())
+ return;
+
GURL osdd_url = main_frame->document().openSearchDescriptionURL();
if (!osdd_url.is_empty()) {
Send(new ChromeViewHostMsg_PageHasOSDD(
« 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