[webkit-reviews] review granted: [Bug 227778] Do not abort ongoing IDB transaction synchronously on non-imminent PrepareToSuspend message : [Attachment 433623] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 15 14:24:15 PDT 2021


Chris Dumez <cdumez at apple.com> has granted Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 227778: Do not abort ongoing IDB transaction synchronously on non-imminent
PrepareToSuspend message
https://bugs.webkit.org/show_bug.cgi?id=227778

Attachment 433623: Patch

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




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

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

r=me with minor comments.

> Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.cpp:124
>  

I think it would be helpful for debugging purposes to have release logging both
in there and in resume().

> Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h:56
> +    bool trySuspend(SuspendType);

I am still not super happy about the naming. Here is a proposal that I think I
like better:
enum class OnlyIfIdle : bool { No, Yes };
bool suspend(OnlyIfIdle = OnlyIfIdle::No);

or
enum class SuspensionCondition : bool { Always, IfIdle };
bool suspend(SuspensionCondition = SuspendCondition::Always);

I changed my mind about the "trySuspend" naming. I think it will be clear if
the enum parameter is nicely named.

> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:397
> +    RELEASE_LOG(ProcessSuspension, "%p -
ProcessAssertion::processAssertionWillBeInvalidated() PID=%d", this, m_pid);

ASSERT(RunLoop::isMain());


More information about the webkit-reviews mailing list