⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282493 in webkit


Ignore:
Timestamp:
Sep 16, 2021, 12:38:59 AM (5 years ago)
Author:
Adrian Perez de Castro
Message:

Merge r275450 - PendingImageBitmap gets created on a stopped script execution context.
​https://bugs.webkit.org/show_bug.cgi?id=223971

Reviewed by Youenn Fablet.

Don't create a PendingImageBitmap in PendingImageBitmap::fetch
if the associated script execution context had already been stoppped.

The new behavior matches of Chrome although it's technically incorrect.

Correcting it to match the spec & Firefox will refactor a larger fix around
how script execution context is used by the threaded loader.

  • html/ImageBitmap.cpp:

(WebCore::PendingImageBitmap::fetch):

Location:
releases/WebKitGTK/webkit-2.32/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog

    r282492 r282493  
     12021-04-02  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        PendingImageBitmap gets created on a stopped script execution context.
     4        https://bugs.webkit.org/show_bug.cgi?id=223971
     5
     6        Reviewed by Youenn Fablet.
     7
     8        Don't create a PendingImageBitmap in PendingImageBitmap::fetch
     9        if the associated script execution context had already been stoppped.
     10
     11        The new behavior matches of Chrome although it's technically incorrect.
     12
     13        Correcting it to match the spec & Firefox will refactor a larger fix around
     14        how script execution context is used by the threaded loader.
     15
     16        * html/ImageBitmap.cpp:
     17        (WebCore::PendingImageBitmap::fetch):
     18
    1192021-03-31  Venky Dass  <yaranamavenkataramana@apple.com>
    220
  • releases/WebKitGTK/webkit-2.32/Source/WebCore/html/ImageBitmap.cpp

    r272475 r282493  
    641641    static void fetch(ScriptExecutionContext& scriptExecutionContext, RefPtr<Blob>&& blob, ImageBitmapOptions&& options, Optional<IntRect> rect, ImageBitmap::Promise&& promise)
    642642    {
     643        if (scriptExecutionContext.activeDOMObjectsAreStopped())
     644            return;
    643645        auto pendingImageBitmap = new PendingImageBitmap(scriptExecutionContext, WTFMove(blob), WTFMove(options), WTFMove(rect), WTFMove(promise));
    644646        pendingImageBitmap->start(scriptExecutionContext);
Note: See TracChangeset for help on using the changeset viewer.