mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
Automatic update from web-platform-testsFix test flakiness around multi-threaded blob URL revocation. Registering a new blob URL in the worker will ensure (at least in chrome) that the revocation has been fully processed before the main thread tries to fetch the now revoked URL. Bug: 851942 Change-Id: I12e794682dbb5b34dc08fe2a7d398e3ba02aaffa Reviewed-on: https://chromium-review.googlesource.com/1097230 Reviewed-by: Joshua Bell <jsbell@chromium.org> Commit-Queue: Marijn Kruisselbrink <mek@chromium.org> Cr-Commit-Position: refs/heads/master@{#566460} -- wpt-commits: 98530fb94412077886e8df96e25bfdcd3ce460d3 wpt-pr: 11477
9 lines
408 B
JavaScript
9 lines
408 B
JavaScript
self.addEventListener('message', e => {
|
|
URL.revokeObjectURL(e.data.url);
|
|
// Registering a new object URL will make absolutely sure that the revocation
|
|
// has propagated. Without this at least in chrome it is possible for the
|
|
// below postMessage to arrive at its destination before the revocation has
|
|
// been fully processed.
|
|
URL.createObjectURL(new Blob([]));
|
|
self.postMessage('revoked');
|
|
});
|