Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cf758a90a435b2e02b182c4b6444c4bfb590049e
      
https://github.com/WebKit/WebKit/commit/cf758a90a435b2e02b182c4b6444c4bfb590049e
  Author: Youenn Fablet <you...@apple.com>
  Date:   2024-06-10 (Mon, 10 Jun 2024)

  Changed paths:
    M Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp
    M Source/WebCore/Modules/filesystemaccess/FileSystemHandle.h

  Log Message:
  -----------
  FileSystemDirectoryHandle::getFileHandle should succeed even if 'this' is GCed
https://bugs.webkit.org/show_bug.cgi?id=275252
rdar://problem/129395480

Reviewed by Ben Nham.

Stop taking a weak pointer of FileSystemDirectoryHandle in 
FileSystemDirectoryHandle::getFileHandle and 
FileSystemDirectoryHandle::getDirectoryHandle.
Instead, we take a weak pointer of its context and return early if the context 
is gone.

This change will be covered by test added in 
https://github.com/WebKit/WebKit/pull/29615.

Since we do not need FileSystemHandle to be thread safe or weak pointer, we 
move it to a simple RefCounted object.

* Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:
(WebCore::FileSystemDirectoryHandle::getFileHandle):
(WebCore::FileSystemDirectoryHandle::getDirectoryHandle):
(WebCore::FileSystemDirectoryHandle::getHandle):
* Source/WebCore/Modules/filesystemaccess/FileSystemHandle.h:

Canonical link: https://commits.webkit.org/279879@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to