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

Unified Diff: Source/web/WebSharedWorkerImpl.cpp

Issue 705003002: Change the return type of WTF::bind() to |OwnPtr<Function>| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reflect comments from yhirano Created 6 years, 1 month 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/WebEmbeddedWorkerImpl.cpp ('k') | Source/wtf/Functional.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebSharedWorkerImpl.cpp
diff --git a/Source/web/WebSharedWorkerImpl.cpp b/Source/web/WebSharedWorkerImpl.cpp
index 3b510ba5d389441e2398343f34a25e1c8175cbce..58901ee08ef9c98704e69560b0ab84c435cb67b9 100644
--- a/Source/web/WebSharedWorkerImpl.cpp
+++ b/Source/web/WebSharedWorkerImpl.cpp
@@ -87,7 +87,7 @@ public:
m_scriptLoader->setClient(0);
}
- void load(ExecutionContext* loadingContext, const KURL& scriptURL, const Closure& receiveResponseCallback, const Closure& finishCallback)
+ void load(ExecutionContext* loadingContext, const KURL& scriptURL, PassOwnPtr<Closure> receiveResponseCallback, PassOwnPtr<Closure> finishCallback)
{
ASSERT(loadingContext);
m_receiveResponseCallback = receiveResponseCallback;
@@ -101,12 +101,12 @@ public:
{
m_identifier = identifier;
m_appCacheID = response.appCacheID();
- m_receiveResponseCallback();
+ (*m_receiveResponseCallback)();
}
virtual void notifyFinished() override
{
- m_finishCallback();
+ (*m_finishCallback)();
}
void cancel()
@@ -128,8 +128,8 @@ private:
RefPtr<WorkerScriptLoader> m_scriptLoader;
unsigned long m_identifier;
long long m_appCacheID;
- Closure m_receiveResponseCallback;
- Closure m_finishCallback;
+ OwnPtr<Closure> m_receiveResponseCallback;
+ OwnPtr<Closure> m_finishCallback;
};
// This function is called on the main thread to force to initialize some static
« no previous file with comments | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | Source/wtf/Functional.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698