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

Unified Diff: Source/modules/serviceworkers/FetchRequestData.cpp

Issue 384633002: Oilpan: add transition types to remaining Fetch and ServiceWorker objects (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another rebase Created 6 years, 5 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/modules/serviceworkers/FetchRequestData.h ('k') | Source/modules/serviceworkers/FetchResponseData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/serviceworkers/FetchRequestData.cpp
diff --git a/Source/modules/serviceworkers/FetchRequestData.cpp b/Source/modules/serviceworkers/FetchRequestData.cpp
index ad006a5b49c243c6bcf77d3dd1ae356618a3fb6e..07b74ea5f613fed72bdd2f89f6f0bf3b330d70e5 100644
--- a/Source/modules/serviceworkers/FetchRequestData.cpp
+++ b/Source/modules/serviceworkers/FetchRequestData.cpp
@@ -15,9 +15,14 @@
namespace WebCore {
-PassRefPtr<FetchRequestData> FetchRequestData::create(ExecutionContext* context)
+PassRefPtrWillBeRawPtr<FetchRequestData> FetchRequestData::create()
{
- RefPtr<FetchRequestData> request(adoptRef(new FetchRequestData()));
+ return adoptRefWillBeNoop(new FetchRequestData());
+}
+
+PassRefPtrWillBeRawPtr<FetchRequestData> FetchRequestData::create(ExecutionContext* context)
+{
+ RefPtrWillBeRawPtr<FetchRequestData> request = FetchRequestData::create();
if (context->isDocument())
request->m_referrer.setClient(WebCore::Referrer(context->url().strippedForUseAsReferrer(), toDocument(context)->referrerPolicy()));
else
@@ -25,9 +30,9 @@ PassRefPtr<FetchRequestData> FetchRequestData::create(ExecutionContext* context)
return request.release();
}
-PassRefPtr<FetchRequestData> FetchRequestData::create(const blink::WebServiceWorkerRequest& webRequest)
+PassRefPtrWillBeRawPtr<FetchRequestData> FetchRequestData::create(const blink::WebServiceWorkerRequest& webRequest)
{
- RefPtr<FetchRequestData> request(adoptRef(new FetchRequestData()));
+ RefPtrWillBeRawPtr<FetchRequestData> request = FetchRequestData::create();
request->m_url = webRequest.url();
request->m_method = webRequest.method();
for (HTTPHeaderMap::const_iterator it = webRequest.headers().begin(); it != webRequest.headers().end(); ++it)
@@ -36,7 +41,7 @@ PassRefPtr<FetchRequestData> FetchRequestData::create(const blink::WebServiceWor
return request.release();
}
-PassRefPtr<FetchRequestData> FetchRequestData::createRestrictedCopy(ExecutionContext* context, PassRefPtr<SecurityOrigin> origin) const
+PassRefPtrWillBeRawPtr<FetchRequestData> FetchRequestData::createRestrictedCopy(ExecutionContext* context, PassRefPtr<SecurityOrigin> origin) const
{
// "To make a restricted copy of a request |request|, run these steps:
// 1. Let |r| be a new request whose url is |request|'s url, method is
@@ -45,7 +50,7 @@ PassRefPtr<FetchRequestData> FetchRequestData::createRestrictedCopy(ExecutionCon
// global object, origin is entry settings object's origin, referrer is
// |client|, context is |connect|, mode is |request|'s mode, and credentials
// mode is |request|'s credentials mode."
- RefPtr<FetchRequestData> request = adoptRef(new FetchRequestData());
+ RefPtrWillBeRawPtr<FetchRequestData> request = FetchRequestData::create();
request->m_url = m_url;
request->m_method = m_method;
request->m_headerList = m_headerList->createCopy();
@@ -78,4 +83,9 @@ FetchRequestData::FetchRequestData()
{
}
+void FetchRequestData::trace(Visitor* visitor)
+{
+ visitor->trace(m_headerList);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/modules/serviceworkers/FetchRequestData.h ('k') | Source/modules/serviceworkers/FetchResponseData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698