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

Unified Diff: chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Split a DCHECK in two as suggested by boliu@. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/web_apps.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
index 4e1ef0bebc328bcec260c2b09dab9d8b99dad7b5..641017996263c13a34e2616c6f54876b1963c8f3 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
@@ -390,8 +390,10 @@ blink::WebDocument PhishingDOMFeatureExtractor::GetNextDocument() {
// Advance to the next frame that contains a document, with no wrapping.
if (frame) {
for (frame = frame->TraverseNext(); frame; frame = frame->TraverseNext()) {
- if (!frame->GetDocument().IsNull()) {
- return frame->GetDocument();
+ // TODO(dcheng): Verify if the WebDocument::IsNull check is really needed.
+ if (frame->IsWebLocalFrame() &&
+ !frame->ToWebLocalFrame()->GetDocument().IsNull()) {
+ return frame->ToWebLocalFrame()->GetDocument();
}
}
} else {
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/web_apps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698