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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
diff --git a/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h b/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
index c26db134b821fe7334bb300f7b254f31160ff394..fb5fad73b00ffe41221b159b052cd6f727745d88 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
+++ b/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
@@ -41,8 +41,6 @@
#include "public/platform/WebAddressSpace.h"
#include "wtf/Forward.h"
#include "wtf/Noncopyable.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -52,9 +50,9 @@ class CORE_EXPORT WorkerThreadStartupData final {
WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData);
USING_FAST_MALLOC(WorkerThreadStartupData);
public:
- static std::unique_ptr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, std::unique_ptr<Vector<char>> cachedMetaData, WorkerThreadStartMode startMode, const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, const SecurityOrigin* starterOrigin, WorkerClients* workerClients, WebAddressSpace addressSpace, const Vector<String>* originTrialTokens, V8CacheOptions v8CacheOptions = V8CacheOptionsDefault)
+ static PassOwnPtr<WorkerThreadStartupData> create(const KURL& scriptURL, const String& userAgent, const String& sourceCode, PassOwnPtr<Vector<char>> cachedMetaData, WorkerThreadStartMode startMode, const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, const SecurityOrigin* starterOrigin, WorkerClients* workerClients, WebAddressSpace addressSpace, const Vector<String>* originTrialTokens, V8CacheOptions v8CacheOptions = V8CacheOptionsDefault)
{
- return wrapUnique(new WorkerThreadStartupData(scriptURL, userAgent, sourceCode, std::move(cachedMetaData), startMode, contentSecurityPolicyHeaders, starterOrigin, workerClients, addressSpace, originTrialTokens, v8CacheOptions));
+ return adoptPtr(new WorkerThreadStartupData(scriptURL, userAgent, sourceCode, std::move(cachedMetaData), startMode, contentSecurityPolicyHeaders, starterOrigin, workerClients, addressSpace, originTrialTokens, v8CacheOptions));
}
~WorkerThreadStartupData();
@@ -62,9 +60,9 @@ public:
KURL m_scriptURL;
String m_userAgent;
String m_sourceCode;
- std::unique_ptr<Vector<char>> m_cachedMetaData;
+ OwnPtr<Vector<char>> m_cachedMetaData;
WorkerThreadStartMode m_startMode;
- std::unique_ptr<Vector<CSPHeaderAndType>> m_contentSecurityPolicyHeaders;
+ OwnPtr<Vector<CSPHeaderAndType>> m_contentSecurityPolicyHeaders;
std::unique_ptr<Vector<String>> m_originTrialTokens;
@@ -77,7 +75,7 @@ public:
//
// See SecurityOrigin::transferPrivilegesFrom() for details on what
// privileges are transferred.
- std::unique_ptr<SecurityOrigin::PrivilegeData> m_starterOriginPrivilegeData;
+ OwnPtr<SecurityOrigin::PrivilegeData> m_starterOriginPrivilegeData;
// This object is created and initialized on the thread creating
// a new worker context, but ownership of it and this WorkerThreadStartupData
@@ -94,7 +92,7 @@ public:
V8CacheOptions m_v8CacheOptions;
private:
- WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, std::unique_ptr<Vector<char>> cachedMetaData, WorkerThreadStartMode, const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, const SecurityOrigin*, WorkerClients*, WebAddressSpace, const Vector<String>* originTrialTokens, V8CacheOptions);
+ WorkerThreadStartupData(const KURL& scriptURL, const String& userAgent, const String& sourceCode, PassOwnPtr<Vector<char>> cachedMetaData, WorkerThreadStartMode, const Vector<CSPHeaderAndType>* contentSecurityPolicyHeaders, const SecurityOrigin*, WorkerClients*, WebAddressSpace, const Vector<String>* originTrialTokens, V8CacheOptions);
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698