[BUGFIX] Avoid race condition in JS Icon API 70/54470/3
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Tue, 24 Oct 2017 19:46:44 +0000 (21:46 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 27 Oct 2017 14:35:42 +0000 (16:35 +0200)
commitc81efca20dc438463bf3f435502962f2bbfa0fe4
tree1ab3c9446578e803ed5d3f0091352bf464a56de3
parent689c9d850e2dfa35057df8a2c0223e62f8434961
[BUGFIX] Avoid race condition in JS Icon API

Now promise is cached instead of promise result, to avoid race condition
when requesting the same icon multiple times.
Now API will do just one ajax call per icon, even if the other API call
is made before the first one finishes.

Resolves: #82851
Releases: master, 8.7
Change-Id: I4110f84d32c7f1856c1664a02d3c9a2ba59168a6
Reviewed-on: https://review.typo3.org/54470
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/Icons.js