I think this race condition can be avoided by doing this:

```js
var dummy = new Image();

dummy.onload = function() {
  // `objectURL` is now loaded and cached, so _should_ be instantly available to display as backgroundImage
  card.style.backgroundImage = 'url(' + objectURL + '), url(' + cachedLayer + ')';

  // since it _should_ be here instantly, it's safe to move immediately to the next step
  URL.revokeObjectURL(cachedLayer);
  WindowManager.screenshots[origin] = objectURL;

  // clean up on aisle 9
  dummy = null;
};

dummy.src = objectURL;
```

I have no idea if this "reusing the image from the browser's cache" strategy will work with URL objects in the same way it does real URLs.