Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate iframe & object resource timing code paths
So far some of the logic in resource timing for subframe navigations iframe/object/embed) was duplicated, e.g. both in blink and in content. This has led to race conditions, inconsistencies and sometimes XSS leaks. This patch attempts to improve the situation by consolidating the code paths: - NavigationRequest receives is_container_initiated, which ensures only container-initiated navigations are reported to the parent. This is a clarification of something that was ambiguous in the spec previously (whatwg/html#8846). It later uses ParentResourceTimingAccess to decide if a navigation should report to its parent with/without response details (status code and mime-type), or not report at all (TAO-fail, not an iframe, not container-initiated). - Both object fallbacks and cancelled navigations (204/205) report to the parent via RenderFrameImpl, and blink converts that to a ResourceTimingInfo object. This allows us to remove the duplicated resource timing creation code in //content. - We report fallback resource timing also for plugin error events and not only for load events. Bug: 1399862 Bug: 1410705 Change-Id: Id37d23cd02eee9e38f812e6f3da99caedafdee3d
- Loading branch information