Currently, for CSSStylesheetResource:
ClearData() is called in NotifyFinished().
After that, only the decoded string is held.
This is blocking Issue 677022, which requires raw bytes (for
subresource integrity) even after NotifyFinished() for unused preloads.
This CL tracks efforts to adjust the ClearData() timing, i.e.
call it in the latter of NotifyFinished() or MatchPreload().
I'll create a doc later.
In a longer term, if this approach is reasonable, we can apply the
same to ScriptResource and thus unify the raw bytes/decoded string handling in ScriptResource and CSSStylesheetResource.
For ScriptResource:
ClearData() is called when SourceText() is called,
which is after NotifyFinished().
After that, only the decoded string is held.
This is needed to allow ScriptStreamer to work on raw bytes if it is before SourceText() call.
If we can make ScriptStreamer to work with decoded data directly (I'm also preparing experimental CLs), then we can also ClearData() at the same timing of "the latter of NotifyFinished() or MatchPreload()".
Comment 1 by hirosh...@chromium.org
, Sep 12