[webkit-reviews] review granted: [Bug 176168] Implement FileSystemDirectoryEntry.getDirectory() : [Attachment 319690] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 2 10:59:54 PDT 2017


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 176168: Implement FileSystemDirectoryEntry.getDirectory()
https://bugs.webkit.org/show_bug.cgi?id=176168

Attachment 319690: Patch

https://bugs.webkit.org/attachment.cgi?id=319690&action=review




--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 319690
  --> https://bugs.webkit.org/attachment.cgi?id=319690
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=319690&action=review

> Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp:288
> +	   callOnMainThread([this, context = makeRef(context),
completionCallback = WTFMove(completionCallback)]() mutable {

Why is it safe to call on main thread without a ref/deref to make sure
DOMFileSystem ("this") is still alive?

> Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp:297
> +	   callOnMainThread([this, context = WTFMove(context),
resolvedVirtualPath = crossThreadCopy(resolvedVirtualPath), entryType =
metadata.type, completionCallback = WTFMove(completionCallback)]() mutable {

Ditto.

> Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp:54
> +    filesystem().getEntry(context, *this, path, flags, [this,
pendingActivity = makePendingActivity(*this), matches = WTFMove(matches),
successCallback = WTFMove(successCallback), errorCallback =
WTFMove(errorCallback)](auto&& result) {

No need to ref/deref "this" here?


More information about the webkit-reviews mailing list