зеркало из https://github.com/mozilla/gecko-dev.git
9ff9f666b0
When requesting a highlighter instance, the inspector front returns one from its cache if present, otherwise it sends a request to the server create a new one. But if multiple requests come in very quickly before the server responds to the original request, the cache is still empty so the front fires a few more requests. How many? It's arbitrary. As many as fit before the original request's promise resolves and the cache is set. This is the root cause for the issue of seeing duplicate highlighters. The issue is more pronounced when there is congestion: many microtasks in the queue, for example when loading a heavy tool like the Inspector on a complex page. To solve this, we store the unsettled promise to create a highlighter and explicitly wait for it to resolve while ignoring subsequent requests. Differential Revision: https://phabricator.services.mozilla.com/D92802 |
||
---|---|---|
.. | ||
client | ||
docs | ||
platform | ||
server | ||
shared | ||
startup | ||
.eslintrc.js | ||
.eslintrc.mochitests.js | ||
.eslintrc.xpcshell.js | ||
CODE_OF_CONDUCT.md | ||
moz.build | ||
templates.mozbuild | ||
tsconfig.json |