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

Changeset 275450 in webkit


Ignore:
Timestamp:
Apr 2, 2021, 4:27:29 PM (6 years ago)
Author:
rniwa@webkit.org
Message:

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:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r275445 r275450  
     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-04-02  Alexey Shvayka  <shvaikalesh@gmail.com>
    220
  • trunk/Source/WebCore/html/ImageBitmap.cpp

    r274164 r275450  
    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.