[webkit-reviews] review granted: [Bug 195302] Check IDB quota usage through QuotaManager : [Attachment 364418] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 13 10:04:46 PDT 2019


Chris Dumez <cdumez at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 195302: Check IDB quota usage through QuotaManager
https://bugs.webkit.org/show_bug.cgi?id=195302

Attachment 364418: Patch

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




--- Comment #33 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 364418
  --> https://bugs.webkit.org/attachment.cgi?id=364418
Patch

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

Would be good if Brady could take a look but it seems fine.

> Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:703
> +void IDBServer::QuotaUser::clearSpaceUsed()

I'd call it 'resetSpaceSpaced'. Clear makes it sound like it might actually
remove files.

> Source/WebCore/Modules/indexeddb/server/IDBServer.cpp:782
> +    quotaManager->requestSpace(taskSize, [callback = WTFMove(callback)](auto
decision) mutable {

Doesn't this work?

quotaManager->requestSpace(taskSize, WTFMove(callback));

> Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp:74
> +    return [&server](PAL::SessionID, const auto& origin) {

Seems risky to capture server by reference here given that you are not calling
the lambda right away and leaving it up to the caller. If the caller were to
store this lambda and dispatch then call it, we could crash.


More information about the webkit-reviews mailing list