Commit bb231ac4 authored by haraken's avatar haraken Committed by Commit bot

Oilpan: Clear a resource when HTMLImportLoader::dispose is called

Otherwise, HTMLImportLoader::startWritingAndParsing can be called after the HTMLImportLoader is disposed.

BUG=582006

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

Cr-Commit-Position: refs/heads/master@{#372099}
parent bba02708
......@@ -66,6 +66,7 @@ void HTMLImportLoader::dispose()
m_document->setImportsController(nullptr);
m_document.clear();
}
clearResource();
}
void HTMLImportLoader::startLoading(const ResourcePtr<RawResource>& resource)
......@@ -105,6 +106,7 @@ void HTMLImportLoader::notifyFinished(Resource* resource)
HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceResponse& response)
{
ASSERT(m_controller);
ASSERT(!m_imports.isEmpty());
DocumentInit init = DocumentInit(response.url(), 0, m_controller->master()->contextDocument(), m_controller)
.withRegistrationContext(m_controller->master()->registrationContext());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment