Title: [112638] branches/chromium/1084/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
Revision
112638
Author
infe...@chromium.org
Date
2012-03-29 19:25:11 -0700 (Thu, 29 Mar 2012)

Log Message

Merge 112576 - [Chromium] WorkerFileSystemContextObserver can reference a deleted WorkerFileSystemCallbacksBridge.
BUG=120007
Review URL: https://chromiumcodereview.appspot.com/9939006

Modified Paths

Diff

Modified: branches/chromium/1084/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp (112637 => 112638)


--- branches/chromium/1084/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp	2012-03-30 02:23:30 UTC (rev 112637)
+++ branches/chromium/1084/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp	2012-03-30 02:25:11 UTC (rev 112638)
@@ -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()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to