summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc4
-rw-r--r--chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc b/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
index 91de230246c..a2841d1f646 100644
--- a/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
+++ b/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
@@ -585,4 +585,8 @@ void FileSystemDispatcher::RemoveOperationPtr(int operation_id) {
cancellable_operations_.erase(operation_id);
}
+void FileSystemDispatcher::Prefinalize() {
+ op_listeners_.CloseAllBindings();
+}
+
} // namespace blink
diff --git a/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h b/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h
index 163d0db1d9b..1692798ba6d 100644
--- a/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h
+++ b/chromium/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h
@@ -31,6 +31,7 @@ class FileSystemDispatcher
: public GarbageCollectedFinalized<FileSystemDispatcher>,
public Supplement<ExecutionContext> {
USING_GARBAGE_COLLECTED_MIXIN(FileSystemDispatcher);
+ USING_PRE_FINALIZER(FileSystemDispatcher, Prefinalize);
public:
using StatusCallback = base::OnceCallback<void(base::File::Error error)>;
@@ -192,7 +193,10 @@ class FileSystemDispatcher
void RemoveOperationPtr(int operation_id);
+ void Prefinalize();
+
mojom::blink::FileSystemManagerPtr file_system_manager_ptr_;
+
using OperationsMap =
HashMap<int, mojom::blink::FileSystemCancellableOperationPtr>;
OperationsMap cancellable_operations_;