Nohemi FernandezI am not sure what is the purpose of the CL.
Do you expect to still see the same freeze, and so want to collect data if that happens?
The purpose of the CL is to ensure that we do not have a scenario where Reading Mode hangs (fails to complete and continues to apply a blur overlay) by introducing a timeout in case the page load in Reading Mode web state does not complete.
I think this is important even if we have fixed one of the issues that may cause this hang (b/454302739) because we do not control the asynchronous operation between web state's `LoadData` and the eventual call to `PageLoaded` and there still may be scenarios that are not covered that we will discover at a later time.
We also are collecting data to understand the latency expectations of `PageLoaded` because this is not something we had done previously.
I've updated the CL description to include this information.
web::PageLoadCompletionStatus load_completion_status) {Nohemi Fernandezshould we check load_completion_status in the method?
Also, if timer timed out, should we avoid calling the delegate?
Unfortunately, `PageLoaded` is also called during WebState activation/deactivation which does not follow the same code path as `LoadContent`. For example during testing I would see `PageLoaded` called following an update via `WebStateListDidChange` notification. This is why I've added the comment below to specify that we cannot have the expectation that `load_data_timer_` is running when entering this method.
// `ReaderModeBrowserAgent` will bypass the call to `LoadContent`.Nohemi FernandezI understand why we need to call stop, but I don't understand this comment.
I've added additional details above.
data_load_timer_ = std::make_unique<base::ElapsedTimer>();Nohemi Fernandezso you have 2 timer testing for the same thing? Can you have only one?
I don't understand what two timers you are referring to. There is a timer that is checking that the distillation is completed which produces the HTML that we will display to the user and a timer that checks that page load has completed.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |