[BUGFIX] Avoid race condition in JS Icon API 86/54486/2
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 15:16:24 +0000 (17:16 +0200)
commitebb10866abbafe4d027651e92c4e09ef6d023fa5
tree9e06480bc00dc914fa3b1fd5919bc4846be89678
parent6d3286b5a9ea8180938dc07fc95b087968bc16f7
[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/54486
Tested-by: TYPO3com <no-reply@typo3.com>
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