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

Unified Diff: Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp

Issue 9939006: Merge 112576 - [Chromium] WorkerFileSystemContextObserver can reference a deleted WorkerFileSystemC… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
===================================================================
--- Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp (revision 112637)
+++ Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp (working copy)
@@ -146,7 +146,7 @@
// that it only gets deleted on the worker context thread which is verified by ~Observer.
class WorkerFileSystemContextObserver : public WebCore::WorkerContext::Observer {
public:
- static PassOwnPtr<WorkerFileSystemContextObserver> create(WorkerContext* context, WorkerFileSystemCallbacksBridge* bridge)
+ static PassOwnPtr<WorkerFileSystemContextObserver> create(WorkerContext* context, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge)
{
return adoptPtr(new WorkerFileSystemContextObserver(context, bridge));
}
@@ -158,15 +158,13 @@
}
private:
- WorkerFileSystemContextObserver(WorkerContext* context, WorkerFileSystemCallbacksBridge* bridge)
+ WorkerFileSystemContextObserver(WorkerContext* context, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge)
: WebCore::WorkerContext::Observer(context)
, m_bridge(bridge)
{
}
- // Since WorkerFileSystemCallbacksBridge manages the lifetime of this class,
- // m_bridge will be valid throughout its lifetime.
- WorkerFileSystemCallbacksBridge* m_bridge;
+ RefPtr<WorkerFileSystemCallbacksBridge> m_bridge;
};
void WorkerFileSystemCallbacksBridge::stop()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698