[Webkit-unassigned] [Bug 237060] Queue throwing exception of blob objects during destruction

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 23 10:00:29 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=237060

--- Comment #10 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 452987
  --> https://bugs.webkit.org/attachment.cgi?id=452987
Patch

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

> Source/WebCore/ChangeLog:10
> +        Instead, we will enqueue a task to do the the throw later. Additionally, if didFail() is called during 

typo: "the the"

> Source/WebCore/ChangeLog:11
> +        VM shut down, then we skip the enqueuing of the task as the task queue may already have shut down.

nit: "may have already" instead of "may already have"?

> Source/WebCore/fileapi/Blob.cpp:292
> +                context->eventLoop().queueTask(TaskSource::InternalAsyncTask, [this, protectedThis = Ref { *this }, code] {

The fact that we're needing to ref `this` here feels wrong because we're calling this from the destructor.  Why do we need to move the exception into m_exception if the object is already being destructed, granted, that didFail() may be called from places not in the destruction path.  This hints that this Blob code is itself not aware of what it's doing.  Let's get input from a WebCore engineer on this to determine if this is actually correct to do.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220223/427b1961/attachment.htm>


More information about the webkit-unassigned mailing list