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

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: rebased 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
« no previous file with comments | « Source/web/WebDataSourceImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebDataSourceImpl.cpp
diff --git a/Source/web/WebDataSourceImpl.cpp b/Source/web/WebDataSourceImpl.cpp
index 8bdb7a1fcd6916bc86ab02f5fe1f584a5b87ba65..4b7bbd809aaca47d0c081cdfee0d344e455127a2 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
@@ -160,6 +160,22 @@ WebDataSourceImpl::WebDataSourceImpl(LocalFrame* frame, const ResourceRequest& r
WebDataSourceImpl::~WebDataSourceImpl()
{
+ // Verify that detachFromFrame() has been called.
+ ASSERT(!m_extraData);
+}
+
+void WebDataSourceImpl::detachFromFrame()
+{
+ RefPtrWillBeRawPtr<DocumentLoader> protect(this);
+
+ DocumentLoader::detachFromFrame();
+ m_extraData.clear();
+ m_pluginLoadObserver.clear();
+}
+
+DEFINE_TRACE(WebDataSourceImpl)
+{
+ DocumentLoader::trace(visitor);
}
} // namespace blink
« no previous file with comments | « Source/web/WebDataSourceImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698