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

Unified Diff: ios/chrome/browser/ui/reading_list/offline_page_native_content.mm

Issue 2800673002: [iOS Reading List] Only allow offline URL when the offline file exists. (Closed)
Patch Set: Update comments Created 3 years, 8 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
Index: ios/chrome/browser/ui/reading_list/offline_page_native_content.mm
diff --git a/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm b/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm
index 9b3a5cddc0251af85669952d866e1b3e3805a37d..cd1c109ab442f1f2590e0bfd66637be353df1869 100644
--- a/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm
+++ b/ios/chrome/browser/ui/reading_list/offline_page_native_content.mm
@@ -86,6 +86,11 @@
}
- (void)reload {
+ if (!_entryURL.is_valid()) {
+ // If entryURL is not valid, the restoreOnlineURL will fail and the |reload|
+ // will be called in a loop. Early return here.
+ return;
+ }
[self restoreOnlineURL];
_webState->GetNavigationManager()->Reload(web::ReloadType::NORMAL,
false /*check_for_repost*/);

Powered by Google App Engine
This is Rietveld 408576698