Chromium Code Reviews| 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]); |
| } |