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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp

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/WorkerScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
index 7bdabf14214438d6f7769914afbec7b71d412dff..e8087ae3f55b8a53539089c7dc528403083a4468 100644
--- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -39,9 +39,8 @@
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/WebAddressSpace.h"
#include "public/platform/WebURLRequest.h"
-#include "wtf/PtrUtil.h"
+#include "wtf/OwnPtr.h"
#include "wtf/RefPtr.h"
-#include <memory>
namespace blink {
@@ -126,7 +125,7 @@ ResourceRequest WorkerScriptLoader::createResourceRequest(WebAddressSpace creati
return request;
}
-void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response, std::unique_ptr<WebDataConsumerHandle> handle)
+void WorkerScriptLoader::didReceiveResponse(unsigned long identifier, const ResourceResponse& response, PassOwnPtr<WebDataConsumerHandle> handle)
{
DCHECK(!handle);
if (response.httpStatusCode() / 100 != 2 && response.httpStatusCode()) {
@@ -170,7 +169,7 @@ void WorkerScriptLoader::didReceiveData(const char* data, unsigned len)
void WorkerScriptLoader::didReceiveCachedMetadata(const char* data, int size)
{
- m_cachedMetadata = wrapUnique(new Vector<char>(size));
+ m_cachedMetadata = adoptPtr(new Vector<char>(size));
memcpy(m_cachedMetadata->data(), data, size);
}
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerScriptLoader.h ('k') | third_party/WebKit/Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698