Bug 1719319: Don't try to use the URLPreloader cache before it's fully initialized...
commita4da20eee20860c13a95fe131d2b3e0ed2d64c7d
authorKris Maglione <maglione.k@gmail.com>
Tue, 27 Jul 2021 20:29:09 +0000 (27 20:29 +0000)
committerKris Maglione <maglione.k@gmail.com>
Tue, 27 Jul 2021 20:29:09 +0000 (27 20:29 +0000)
treec2ad00df2c6dbf95583f4c85ef3e8aba13b7bec9
parent560b3e7e986f861ada6ae255d6dbf6a514ed038d
Bug 1719319: Don't try to use the URLPreloader cache before it's fully initialized. r=mccr8

Anything accessed before that time won't benefit from caching, and having
entries inserted into the hashtable before the cache file is read may lead to
undefined behavior.

This bug shouldn't be exploitable, since it only affects file reads that
happen long before any untrusted code has a chance to run.

Differential Revision: https://phabricator.services.mozilla.com/D120391
js/xpconnect/loader/URLPreloader.cpp