Make WordPress Core

Changeset 56119


Ignore:
Timestamp:
06/30/2023 08:49:57 PM (15 months ago)
Author:
westonruter
Message:

Emoji: Give name to web worker in emoji loader and terminate when finished.

See #58472.
Follow-up to [56074], [56095].
Props westonruter, joemcgill.
Fixes #58691.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/emoji-loader.js

    r56095 r56119  
    367367                    type: 'text/javascript'
    368368                } );
    369                 var worker = new Worker( URL.createObjectURL( blob ) );
     369                var worker = new Worker( URL.createObjectURL( blob ), { name: 'wpTestEmojiSupports' } );
    370370                worker.onmessage = function ( event ) {
    371371                    supportTests = event.data;
    372372                    setSessionSupportTests( supportTests );
     373                    worker.terminate();
    373374                    resolve( supportTests );
    374375                };
Note: See TracChangeset for help on using the changeset viewer.