Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1650)

Unified Diff: Source/web/WebDataSourceImpl.cpp

Issue 1194003004: Oilpan: enable appcache + move DocumentLoader to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add outer loader protection Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/WebDataSourceImpl.cpp
diff --git a/Source/web/WebDataSourceImpl.cpp b/Source/web/WebDataSourceImpl.cpp
index 8bdb7a1fcd6916bc86ab02f5fe1f584a5b87ba65..019a9681a39f0f0e97f478149a94338b29c204ef 100644
--- a/Source/web/WebDataSourceImpl.cpp
+++ b/Source/web/WebDataSourceImpl.cpp
@@ -44,9 +44,9 @@ static OwnPtr<WebPluginLoadObserver>& nextPluginLoadObserver()
return nextPluginLoadObserver;
}
-PassRefPtr<WebDataSourceImpl> WebDataSourceImpl::create(LocalFrame* frame, const ResourceRequest& request, const SubstituteData& data)
+PassRefPtrWillBeRawPtr<WebDataSourceImpl> WebDataSourceImpl::create(LocalFrame* frame, const ResourceRequest& request, const SubstituteData& data)
{
- return adoptRef(new WebDataSourceImpl(frame, request, data));
+ return adoptRefWillBeNoop(new WebDataSourceImpl(frame, request, data));
}
const WebURLRequest& WebDataSourceImpl::originalRequest() const
@@ -162,4 +162,18 @@ WebDataSourceImpl::~WebDataSourceImpl()
{
}
+void WebDataSourceImpl::detachFromFrame()
+{
+ RefPtrWillBeRawPtr<DocumentLoader> protect(this);
+
+ DocumentLoader::detachFromFrame();
+ m_extraData.clear();
+ m_pluginLoadObserver.clear();
+}
+
+DEFINE_TRACE(WebDataSourceImpl)
+{
+ DocumentLoader::trace(visitor);
+}
+
} // namespace blink
« Source/core/loader/appcache/ApplicationCacheHost.cpp ('K') | « Source/web/WebDataSourceImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698