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

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

Issue 2616633003: Fix crash in StaticHTMLNativeContent when deallocating WKWebView on iOS9 (Closed)
Patch Set: no dismiss -> close call Created 3 years, 11 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 7d1945ebd9585d5875e877c1ca11c733a5641880..95568e28a98f2580ec7ed0f22797a89f166a71e4 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
@@ -73,6 +73,7 @@
- (void)willBeDismissed {
[self restoreOnlineURL];
+ [super willBeDismissed];
}
- (void)close {
@@ -92,6 +93,9 @@
- (void)restoreOnlineURL {
web::NavigationItem* item =
_webState->GetNavigationManager()->GetLastCommittedItem();
+ if (!item || item->GetVirtualURL() != [self virtualURL]) {
Eugene But (OOO till 7-30) 2017/01/04 21:24:38 Could you please add a comment which explains then
Olivier 2017/01/06 10:03:24 This was possible in the dealloc. Not true anymore
+ return;
+ }
item->SetURL([self virtualURL]);
item->SetVirtualURL([self virtualURL]);
}

Powered by Google App Engine
This is Rietveld 408576698