NTP open tab in incognito window + prefetch hits assert |
|||
Issue description
|windowOpenDisposition| is likely WindowOpenDisposition::OFF_THE_RECORD, which isn't one of the things we allow with our assert:
assert windowOpenDisposition == WindowOpenDisposition.CURRENT_TAB
|| windowOpenDisposition == WindowOpenDisposition.NEW_WINDOW
|| windowOpenDisposition == WindowOpenDisposition.NEW_BACKGROUND_TAB;
https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegateImpl.java?q=IsDataReductionProxyEnabled+lang:Java&dr=C&l=130
08-13 15:37:28.436 3937 3937 E AndroidRuntime: java.lang.AssertionError
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at org.chromium.chrome.browser.suggestions.SuggestionsNavigationDelegateImpl.openSnippet(SuggestionsNavigationDelegateImpl.java:131)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at org.chromium.chrome.browser.ntp.snippets.SnippetArticleViewHolder.openItem(SnippetArticleViewHolder.java:96)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at org.chromium.chrome.browser.ntp.ContextMenuManager$ItemClickListener.onMenuItemClick(ContextMenuManager.java:209)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:148)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:904)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:894)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at com.android.internal.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.widget.AdapterView.performItemClick(AdapterView.java:310)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.widget.AbsListView.performItemClick(AbsListView.java:1156)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.widget.AbsListView$PerformClick.run(AbsListView.java:3121)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.widget.AbsListView$3.run(AbsListView.java:4036)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:751)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6088)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
08-13 15:37:28.436 3937 3937 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Probably isn't terribly important, since release builds don't have the assert, and I think opening the offline article in incognito mode is the correct behavior anyways, which is what release builds do.
Note that prefetch is disabled in US, and manually downloaded articles do not hit this. I'm reproing by setting |limitless_prefetching_enabled| to true, but if your device is in a different locale, that should work as well.
,
Aug 14
If opening in incognito should work, feel free to assign back to me. The bad code is definitely Zine code, not OP.
,
Aug 14
If a regular Jardin/Zine article can be opened in an incognito page I don't see any reason why prefetched articles shouldn't. +jianli to check if there's any restrictions from the offline page navigation interceptor side.
,
Aug 14
The offline pages do not work under incognito mode and live page is always being fetched.
,
Aug 14
I can't find a bug for this behavior. But this has been mentioned in some CLs, like https://codereview.chromium.org/2836423002/
,
Aug 15
Hmm, I don't quite understand what is stopping the incognito load right now. But if we don't want to support this use case, that's fine as well. It looks like there's conflicting incognito and offline page UI to the left of the URL that would need to be resolved anyway. Taking this task back. For incognito opens, it sounds like we shouldn't be setting load params to open this offline, and we probably should be setting the referer. |
|||
►
Sign in to add a comment |
|||
Comment 1 by fgor...@chromium.org
, Aug 14Components: UI>Browser>Offline
Labels: zine-triaged
Owner: carlosk@chromium.org
Status: Assigned (was: Untriaged)