[webkit-reviews] review granted: [Bug 224305] Create WebIDBServer only when it is needed : [Attachment 425555] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 9 10:55:20 PDT 2021


Alex Christensen <achristensen at apple.com> has granted Sihui Liu
<sihui_liu at apple.com>'s request for review:
Bug 224305: Create WebIDBServer only when it is needed
https://bugs.webkit.org/show_bug.cgi?id=224305

Attachment 425555: Patch

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




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

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

> Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.cpp:435
> +    m_closeCallback();

It would probably be worth null checking m_closeCallback to make this more
robust in case some tries to call tryClose twice in the future.

> Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h:107
> +    typedef RefCounter<DataTaskCounterType> DataTaskCounter;

"using DataTaskCounter = RefCounter<DataTaskCounterType>" is the cool new way
to do this.  Same with DataTaskCounterToken

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2330
>	   RefPtr<StorageQuotaManager> storageQuotaManager = weakThis ?
this->storageQuotaManager(sessionID, origin) : nullptr;

If you used weakThis-> instead of this-> then you wouldn't need to capture
this.  That would be better because it wouldn't allow you to accidentally use
an unchecked this pointer (which is easy to do).


More information about the webkit-reviews mailing list