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

Unified Diff: Source/modules/webdatabase/SQLCallbackWrapper.h

Issue 563703002: Oilpan: Enable oilpan for callback classes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/webdatabase/InspectorDatabaseAgent.cpp ('k') | Source/modules/webdatabase/SQLStatement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/SQLCallbackWrapper.h
diff --git a/Source/modules/webdatabase/SQLCallbackWrapper.h b/Source/modules/webdatabase/SQLCallbackWrapper.h
index ecee88c9532914bc58d17f2031cbdfd9a5bb41b9..04cd2f346b87fc0b896d6d6c14065f2da7f55741 100644
--- a/Source/modules/webdatabase/SQLCallbackWrapper.h
+++ b/Source/modules/webdatabase/SQLCallbackWrapper.h
@@ -44,7 +44,7 @@ namespace blink {
template<typename T> class SQLCallbackWrapper {
DISALLOW_ALLOCATION();
public:
- SQLCallbackWrapper(PassOwnPtrWillBeRawPtr<T> callback, ExecutionContext* executionContext)
+ SQLCallbackWrapper(T* callback, ExecutionContext* executionContext)
: m_callback(callback)
, m_executionContext(m_callback ? executionContext : 0)
{
@@ -75,7 +75,6 @@ public:
m_executionContext.clear();
#else
ExecutionContext* context;
- OwnPtr<T> callback;
{
MutexLocker locker(m_mutex);
if (!m_callback) {
@@ -88,13 +87,12 @@ public:
return;
}
context = m_executionContext.release().leakRef();
- callback = m_callback.release();
}
- context->postTask(SafeReleaseTask::create(callback.release()));
+ context->postTask(SafeReleaseTask::create(m_callback));
#endif
}
- PassOwnPtrWillBeRawPtr<T> unwrap()
+ T* unwrap()
{
MutexLocker locker(m_mutex);
ASSERT(!m_callback || m_executionContext->isContextThread());
@@ -109,7 +107,7 @@ private:
#if !ENABLE(OILPAN)
class SafeReleaseTask : public ExecutionContextTask {
public:
- static PassOwnPtr<SafeReleaseTask> create(PassOwnPtr<T> callbackToRelease)
+ static PassOwnPtr<SafeReleaseTask> create(T* callbackToRelease)
{
return adoptPtr(new SafeReleaseTask(callbackToRelease));
}
@@ -124,17 +122,17 @@ private:
virtual bool isCleanupTask() const { return true; }
private:
- explicit SafeReleaseTask(PassOwnPtr<T> callbackToRelease)
+ explicit SafeReleaseTask(T* callbackToRelease)
: m_callbackToRelease(callbackToRelease)
{
}
- OwnPtr<T> m_callbackToRelease;
+ CrossThreadPersistent<T> m_callbackToRelease;
};
#endif
Mutex m_mutex;
- OwnPtrWillBeMember<T> m_callback;
+ CrossThreadPersistentWillBeMember<T> m_callback;
RefPtrWillBeMember<ExecutionContext> m_executionContext;
};
« no previous file with comments | « Source/modules/webdatabase/InspectorDatabaseAgent.cpp ('k') | Source/modules/webdatabase/SQLStatement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698