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

Unified Diff: Source/modules/cachestorage/Cache.cpp

Issue 1320563003: Oilpan: avoid using WeakPtr<> for heap residing objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert unrelated unit test addition Created 5 years, 4 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/modules/cachestorage/Cache.cpp
diff --git a/Source/modules/cachestorage/Cache.cpp b/Source/modules/cachestorage/Cache.cpp
index 73c7f8a64a7ab64cd16ffe11f1e07517eb8ae14b..5a122fd27c3fe28418fb690068efb582581a006e 100644
--- a/Source/modules/cachestorage/Cache.cpp
+++ b/Source/modules/cachestorage/Cache.cpp
@@ -277,7 +277,7 @@ private:
WebServiceWorkerResponse m_webResponse;
};
-Cache* Cache::create(WeakPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnPtr<WebServiceWorkerCache> webCache)
+Cache* Cache::create(WeakPtrWillBeRawPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnPtr<WebServiceWorkerCache> webCache)
{
return new Cache(fetcher, webCache);
}
@@ -389,9 +389,16 @@ WebServiceWorkerCache::QueryParams Cache::toWebQueryParams(const CacheQueryOptio
return webQueryParams;
}
-Cache::Cache(WeakPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnPtr<WebServiceWorkerCache> webCache)
+Cache::Cache(WeakPtrWillBeRawPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnPtr<WebServiceWorkerCache> webCache)
: m_scopedFetcher(fetcher)
- , m_webCache(webCache) { }
+ , m_webCache(webCache)
+{
+}
+
+DEFINE_TRACE(Cache)
+{
+ visitor->trace(m_scopedFetcher);
+}
ScriptPromise Cache::matchImpl(ScriptState* scriptState, const Request* request, const CacheQueryOptions& options)
{

Powered by Google App Engine
This is Rietveld 408576698