Index: chrome/browser/net/resource_prefetch_predictor_observer.cc |
diff --git a/chrome/browser/net/resource_prefetch_predictor_observer.cc b/chrome/browser/net/resource_prefetch_predictor_observer.cc |
index d1517f14920d6c532bcba1dbd7e9263fd1854ec2..b8925160a17880cf10a21527255102385a2c40fb 100644 |
--- a/chrome/browser/net/resource_prefetch_predictor_observer.cc |
+++ b/chrome/browser/net/resource_prefetch_predictor_observer.cc |
@@ -70,7 +70,9 @@ bool TryToFillNavigationID( |
return false; |
*navigation_id = |
predictors::NavigationID(web_contents, main_frame_url, creation_time); |
- return true; |
+ // A WebContents might be associated with something that is not a tab. |
+ // In this case tab_id will be -1 and is_valid() will return false. |
+ return navigation_id->is_valid(); |
} |
} // namespace |