Oilpan: dispose an HTMLImportsController on document detach/removal.

When a Document becomes detached and removes its HTMLImportsController
supplement, this will synchronously remove the controller and all
its "HTML imports" owned objects, in a non-Oilpan setting. This cancels
all ongoing loaders and more (cf. HTMLImportsController::removeFrom().)

ResourceFetcher objects are moving to accurately detaching from their
FrameFetchContexts when their frames become detached from a document
(http://crbug.com/458222). This implies that we cannot have loader objects
active, as that may cause FrameFetchContexts to be accessed, but once
lacking a frame. The code is no longer that expecting that.

For HTML imports loaders, this is avoided by synchronously cancelling &
finalizing the loaders, but that doesn't happen for Oilpan. It needs to,
so an explicit dispose() step is introduced for HTMLImportsController
and all its associated objects.

R=haraken
BUG=340522

Review URL: https://codereview.chromium.org/1032293002

git-svn-id: svn://svn.chromium.org/blink/trunk@192677 bbb929c8-8fbe-4397-9dbb-9b2b20218538
8 files changed
tree: 29b24e4669090d998fc9f45a8f7a80d06115fd41
  1. third_party/