Offline Page Cache: allow MHTML file save to be successful even if frames are missing |
||||||||
Issue descriptionDynamic pages can create or destroy frames during its loading and this might cause an MHTML save operation to fail. For the specific case of Offline Page Cache, having the most accurate representation of a page is less important that having a minimally relevant version of it. So, for our use case we should not consider missing frames a fail condition. Other use cases should be left unchanged.
,
Oct 19 2016
,
Nov 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/29da4fe0a2b453e474e6cd530332a2ed02f70576 commit 29da4fe0a2b453e474e6cd530332a2ed02f70576 Author: carlosk <carlosk@chromium.org> Date: Tue Nov 29 00:01:29 2016 Fail when saving page as MHTML provides information about the cause. This change adds more detailed information to tracing and UMA histograms about the reason why a MHTML save operation has failed. This will help us understand why some specific pages consistently fail and better handle these situations. It introduces a new enum, MhtmlSaveStatus, that lists all tracked causes. Part of the reasons are tracked by the browser and the others by the render process but the reporting is centralized in the former. A few tests from MHTMLGenerationTest were also changed to verify the MHTML failures they test for are correctly reported. BUG= 645686 , 655723 ,655708 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2519273002 Cr-Commit-Position: refs/heads/master@{#434783} [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/browser/download/mhtml_generation_browsertest.cc [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/browser/download/mhtml_generation_manager.cc [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/browser/download/mhtml_generation_manager.h [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/browser/frame_host/render_frame_host_impl.cc [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/browser/frame_host/render_frame_host_impl.h [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/common/BUILD.gn [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/common/content_param_traits_macros.h [add] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/common/download/mhtml_save_status.cc [add] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/common/download/mhtml_save_status.h [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/common/frame_messages.h [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/renderer/render_frame_impl.cc [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/content/renderer/render_frame_impl.h [modify] https://crrev.com/29da4fe0a2b453e474e6cd530332a2ed02f70576/tools/metrics/histograms/histograms.xml
,
Nov 29 2016
,
Nov 30 2016
As discussed with petewil@, making this change would also allow us to save even more broken pages than we are already capable. So this must be followed by tests that verify we are actually capable of saving "good enough" pages even when iframes are missing. This effort could be incorporated on the efforts we are already making to create a page quality testing and evaluation system so that these are continuously and broadly verified.
,
Dec 8 2016
,
Feb 17 2017
,
Mar 1 2017
Fixit update: this is a good one for fixit but only after issue 672292 is resolved (which is conveniently also a fixit one).
,
Apr 21 2017
In the context of issue 672292 the generation and writing of the MHTML footer has already been moved to the browser process. It hasn't yet been marked as fixed because it also encompasses the MHTML header code. As having the footer code moved already unblocks this issue I'removing the dependency to that one. The work needed here is: - Add new configuration parameter to MHTML generation to allow clients to set the saving to ignore missing frames and/or destroyed render processes. - Detect these situations in MHTMLGenerationManager and act accordingly to the generation parameters set by either skipping missing frames/renderers or failing the operation. - Add new tests to MHTMLGenerationTest to verify this works as intended.
,
Apr 28 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by carlosk@chromium.org
, Oct 13 2016