Index: components/dom_distiller/content/distiller_page_web_contents.cc |
diff --git a/components/dom_distiller/content/distiller_page_web_contents.cc b/components/dom_distiller/content/distiller_page_web_contents.cc |
index c0c7ff565225cc228a9ec156c87149037986479f..c55f9da3a69be5ba090b5d135c45c25a44f8e665 100644 |
--- a/components/dom_distiller/content/distiller_page_web_contents.cc |
+++ b/components/dom_distiller/content/distiller_page_web_contents.cc |
@@ -62,9 +62,13 @@ void DistillerPageWebContents::DidFinishLoad(int64 frame_id, |
const GURL& validated_url, |
bool is_main_frame, |
RenderViewHost* render_view_host) { |
+ if (validated_url != web_contents_->GetURL()) { |
Yaron
2014/01/29 20:03:41
Why are these necessary? To ensure the page wasn't
shashi
2014/01/29 22:51:37
Done, I can use is_main_frame.
|
+ return; |
+ } |
content::WebContentsObserver::Observe(NULL); |
OnLoadURLDone(); |
} |
+ |
void DistillerPageWebContents::DidFailLoad( |
int64 frame_id, |
const GURL& validated_url, |
@@ -72,6 +76,9 @@ void DistillerPageWebContents::DidFailLoad( |
int error_code, |
const base::string16& error_description, |
RenderViewHost* render_view_host) { |
+ if (validated_url != web_contents_->GetURL()) { |
+ return; |
+ } |
content::WebContentsObserver::Observe(NULL); |
OnLoadURLFailed(); |
} |