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

Unified Diff: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp

Issue 2049003002: Wrap GCed raw pointer parameters of WTF::bind with Persistent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert "unretained" part and "disallow pointers" part Created 4 years, 6 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
Index: third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
index 10feb917d8a7e3785788878844c88fbc1b1148bb..450b62b45ab991357ddfa0cce138d777a6eeaa00 100644
--- a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
@@ -85,16 +85,16 @@ void LocalFileSystem::resolveURL(ExecutionContext* context, const KURL& fileSyst
{
CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks));
requestFileSystemAccessInternal(context,
- bind(&LocalFileSystem::resolveURLInternal, this, context, fileSystemURL, wrapper),
- bind(&LocalFileSystem::fileSystemNotAllowedInternal, this, context, wrapper));
+ bind(&LocalFileSystem::resolveURLInternal, wrapCrossThreadPersistent(this), wrapCrossThreadPersistent(context), fileSystemURL, wrapCrossThreadPersistent(wrapper)),
+ bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapCrossThreadPersistent(this), wrapCrossThreadPersistent(context), wrapCrossThreadPersistent(wrapper)));
}
void LocalFileSystem::requestFileSystem(ExecutionContext* context, FileSystemType type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks));
requestFileSystemAccessInternal(context,
- bind(&LocalFileSystem::fileSystemAllowedInternal, this, context, type, wrapper),
- bind(&LocalFileSystem::fileSystemNotAllowedInternal, this, context, wrapper));
+ bind(&LocalFileSystem::fileSystemAllowedInternal, wrapCrossThreadPersistent(this), wrapCrossThreadPersistent(context), type, wrapCrossThreadPersistent(wrapper)),
+ bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapCrossThreadPersistent(this), wrapCrossThreadPersistent(context), wrapCrossThreadPersistent(wrapper)));
}
void LocalFileSystem::deleteFileSystem(ExecutionContext* context, FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
@@ -104,8 +104,8 @@ void LocalFileSystem::deleteFileSystem(ExecutionContext* context, FileSystemType
CallbackWrapper* wrapper = new CallbackWrapper(std::move(callbacks));
requestFileSystemAccessInternal(context,
- bind(&LocalFileSystem::deleteFileSystemInternal, this, context, type, wrapper),
- bind(&LocalFileSystem::fileSystemNotAllowedInternal, this, context, wrapper));
+ bind(&LocalFileSystem::deleteFileSystemInternal, wrapCrossThreadPersistent(this), wrapCrossThreadPersistent(context), type, wrapCrossThreadPersistent(wrapper)),
+ bind(&LocalFileSystem::fileSystemNotAllowedInternal, wrapCrossThreadPersistent(this), wrapCrossThreadPersistent(context), wrapCrossThreadPersistent(wrapper)));
}
WebFileSystem* LocalFileSystem::getFileSystem() const

Powered by Google App Engine
This is Rietveld 408576698