| Index: Source/core/loader/appcache/ApplicationCacheHost.cpp
|
| diff --git a/Source/core/loader/appcache/ApplicationCacheHost.cpp b/Source/core/loader/appcache/ApplicationCacheHost.cpp
|
| index 3c57691e164a2fd0646e0279294a2f4864d8ec42..e20e935e906a17fde2de4056d8f210231810f4cb 100644
|
| --- a/Source/core/loader/appcache/ApplicationCacheHost.cpp
|
| +++ b/Source/core/loader/appcache/ApplicationCacheHost.cpp
|
| @@ -164,6 +164,19 @@ void ApplicationCacheHost::setApplicationCache(ApplicationCache* domApplicationC
|
| m_domApplicationCache = domApplicationCache;
|
| }
|
|
|
| +void ApplicationCacheHost::dispose()
|
| +{
|
| + // FIXME: Oilpan: remove the dispose step when the owning DocumentLoader
|
| + // becomes a garbage collected object. Until that time, have the
|
| + // DocumentLoader dispose and disable this ApplicationCacheHost when
|
| + // it is finalized. Releasing the WebApplicationCacheHost is needed
|
| + // to prevent further embedder notifications, which risk accessing an
|
| + // invalid DocumentLoader.
|
| + setApplicationCache(0);
|
| + m_host.clear();
|
| + m_documentLoader = nullptr;
|
| +}
|
| +
|
| void ApplicationCacheHost::notifyApplicationCache(EventID id, int progressTotal, int progressDone, WebApplicationCacheHost::ErrorReason errorReason, const String& errorURL, int errorStatus, const String& errorMessage)
|
| {
|
| if (id != PROGRESS_EVENT)
|
|
|