[Webkit-unassigned] [Bug 234113] Load & Error events of an <img> element should be dispatched asynchronously

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 10 16:15:28 PST 2021


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

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

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

>> Source/WebCore/html/HTMLImageLoader.cpp:65
>> +    element().document().eventLoop().queueTask(TaskSource::DOMManipulation, [element = Ref { element() }, errorOccurred] {
> 
> Many tests are failing. I think the issue is that the page load event can now fire *before* an image's load/error event. We likely need to delay the firing of the page's load event somehow. Or maybe we need to make something asynchronous earlier in the call stack instead.
> Do you have a stack trace of this event getting called synchronously in the context of your test? It would help determinate how to best fix this.

Yes, I think it is likely one of the callers need to be fixed instead.

You can see that some callers already call this function asynchronously (e.g. via `loadEventSender().dispatchEventSoon(*this);`) so adding a queueTask() here delays it one run loop iteration further.

-- 
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/20211211/2fa432a7/attachment.htm>


More information about the webkit-unassigned mailing list