} // namespace
-class CallbackWrapper : public RefCounted<CallbackWrapper> {
+class CallbackWrapper FINAL : public GarbageCollectedFinalized<CallbackWrapper> {
public:
CallbackWrapper(PassOwnPtr<AsyncFileSystemCallbacks> c)
: m_callbacks(c)
return m_callbacks.release();
}
+ void trace(Visitor*) { }
+
private:
OwnPtr<AsyncFileSystemCallbacks> m_callbacks;
};
void LocalFileSystem::resolveURL(ExecutionContext* context, const KURL& fileSystemURL, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
RefPtrWillBeRawPtr<ExecutionContext> contextPtr(context);
- RefPtr<CallbackWrapper> wrapper = adoptRef(new CallbackWrapper(callbacks));
+ CallbackWrapper* wrapper = new CallbackWrapper(callbacks);
requestFileSystemAccessInternal(context,
bind(&LocalFileSystem::resolveURLInternal, this, contextPtr, fileSystemURL, wrapper),
bind(&LocalFileSystem::fileSystemNotAllowedInternal, this, contextPtr, wrapper));
void LocalFileSystem::requestFileSystem(ExecutionContext* context, FileSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
RefPtrWillBeRawPtr<ExecutionContext> contextPtr(context);
- RefPtr<CallbackWrapper> wrapper = adoptRef(new CallbackWrapper(callbacks));
+ CallbackWrapper* wrapper = new CallbackWrapper(callbacks);
requestFileSystemAccessInternal(context,
bind(&LocalFileSystem::fileSystemAllowedInternal, this, contextPtr, type, wrapper),
bind(&LocalFileSystem::fileSystemNotAllowedInternal, this, contextPtr, wrapper));
ASSERT(context);
ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument());
- RefPtr<CallbackWrapper> wrapper = adoptRef(new CallbackWrapper(callbacks));
+ CallbackWrapper* wrapper = new CallbackWrapper(callbacks);
requestFileSystemAccessInternal(context,
bind(&LocalFileSystem::deleteFileSystemInternal, this, contextPtr, type, wrapper),
bind(&LocalFileSystem::fileSystemNotAllowedInternal, this, contextPtr, wrapper));
void LocalFileSystem::fileSystemNotAvailable(
PassRefPtrWillBeRawPtr<ExecutionContext> context,
- PassRefPtr<CallbackWrapper> callbacks)
+ CallbackWrapper* callbacks)
{
context->postTask(createCrossThreadTask(&reportFailure, callbacks->release(), FileError::ABORT_ERR));
}
void LocalFileSystem::fileSystemNotAllowedInternal(
PassRefPtrWillBeRawPtr<ExecutionContext> context,
- PassRefPtr<CallbackWrapper> callbacks)
+ CallbackWrapper* callbacks)
{
context->postTask(createCrossThreadTask(&reportFailure, callbacks->release(), FileError::ABORT_ERR));
}
void LocalFileSystem::fileSystemAllowedInternal(
PassRefPtrWillBeRawPtr<ExecutionContext> context,
FileSystemType type,
- PassRefPtr<CallbackWrapper> callbacks)
+ CallbackWrapper* callbacks)
{
if (!fileSystem()) {
fileSystemNotAvailable(context, callbacks);
void LocalFileSystem::resolveURLInternal(
PassRefPtrWillBeRawPtr<ExecutionContext> context,
const KURL& fileSystemURL,
- PassRefPtr<CallbackWrapper> callbacks)
+ CallbackWrapper* callbacks)
{
if (!fileSystem()) {
fileSystemNotAvailable(context, callbacks);
void LocalFileSystem::deleteFileSystemInternal(
PassRefPtrWillBeRawPtr<ExecutionContext> context,
FileSystemType type,
- PassRefPtr<CallbackWrapper> callbacks)
+ CallbackWrapper* callbacks)
{
if (!fileSystem()) {
fileSystemNotAvailable(context, callbacks);