[webkit-reviews] review granted: [Bug 196623] Close service worker database on network process suspension : [Attachment 366846] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 9 11:30:08 PDT 2019

Alex Christensen <achristensen at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 196623: Close service worker database on network process suspension

Attachment 366846: Patch


--- Comment #7 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 366846
  --> https://bugs.webkit.org/attachment.cgi?id=366846

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

> Source/WebCore/workers/service/server/RegistrationDatabase.cpp:288
> +    postTaskToWorkQueue([this, completionHandler =
WTFMove(completionHandler)]() mutable {

It might be useful to have an ASSERT(isMainThread()) before this.
Also, what guarantees "this" is still alive when it is used?  Please use a
RefPtr or a WeakPtr to avoid UAF.

> Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:1793
> +    EXPECT_TRUE([[NSFileManager defaultManager]

Should we remove this file to clean up so it doesn't affect future tests?

More information about the webkit-reviews mailing list