Make FrameFetchContext detachable

Desktop / Chromium - Yutaka Hirano [chromium.org] - 11 June 2017 23:36 EDT

This CL makes FrameFetchContext work after detached from the underlying frame and document, in order to support use-cases currently covered by PingLoader.

After detached, FrameFetchContext stops notifying, but keeps enforcing security checks by storing the security information when detached. One important TODO is ShouldBlockFetchByMixedContentCheck which is not implemented in this CL because MixedContentChecker requires a real Frame instance.

Bug: 695939 Change-Id: I0fee9d39cd996a5546fe8378910386d9de7dc27d Reviewed-on: https://chromium-review.googlesource.com/518743 Commit-Queue: Yutaka Hirano

cab9172 Make FrameFetchContext detachable
third_party/WebKit/Source/core/dom/Document.cpp | 19 +-
.../core/html/imports/HTMLImportsController.cpp | 8 +-
.../Source/core/loader/FrameFetchContext.cpp | 319 +++++++++++++++++---
.../WebKit/Source/core/loader/FrameFetchContext.h | 16 +-
.../Source/core/loader/FrameFetchContextTest.cpp | 327 +++++++++++++++++++++
.../WebKit/Source/core/loader/FrameLoader.cpp | 6 -
.../WebKit/Source/core/loader/FrameLoader.h | 2 -
.../Source/web/tests/LocalFrameClientImplTest.cpp | 7 +-
8 files changed, 636 insertions(+), 68 deletions(-)

Upstream: git.chromium.org


  • Share