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

Unified Diff: ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm

Issue 2904053002: [ios] Active web state observer in tab collection. (Closed)
Patch Set: Update unittest Created 3 years, 7 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 | « no previous file | ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm
diff --git a/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm b/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm
index 4f1be95a138fbede477a10838c6df09292275a00..2bc0022405217b032abcd9a24dff53a3b4fa5290 100644
--- a/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm
+++ b/ios/clean/chrome/browser/ui/find_in_page/find_in_page_mediator.mm
@@ -72,9 +72,11 @@
- (void)stopFinding {
web::WebState* webState = self.webStateList->GetActiveWebState();
- FindTabHelper* helper = FindTabHelper::FromWebState(webState);
- DCHECK(helper);
- helper->StopFinding(nil);
+ if (webState) {
+ FindTabHelper* helper = FindTabHelper::FromWebState(webState);
+ DCHECK(helper);
+ helper->StopFinding(nil);
+ }
}
- (void)findResultsAvailable:(FindInPageModel*)model {
« no previous file with comments | « no previous file | ios/clean/chrome/browser/ui/tab_collection/tab_collection_consumer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698