зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1762521 - Add further locking to JumpListBuilder. r=mhowell,jesup
This fixes two cases where thread safety analysis complains about us not holding the monitor. Differential Revision: https://phabricator.services.mozilla.com/D142775
This commit is contained in:
Родитель
d4353d63a9
Коммит
14c08205a6
|
@ -107,6 +107,7 @@ JumpListBuilder::JumpListBuilder()
|
|||
return;
|
||||
}
|
||||
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
// Since we are accessing mJumpListMgr across different threads
|
||||
// (ie, different apartments), mJumpListMgr must be an agile reference.
|
||||
mJumpListMgr = jumpListMgr;
|
||||
|
@ -140,6 +141,7 @@ JumpListBuilder::~JumpListBuilder() {
|
|||
|
||||
NS_IMETHODIMP JumpListBuilder::SetAppUserModelID(
|
||||
const nsAString& aAppUserModelId) {
|
||||
ReentrantMonitorAutoEnter lock(mMonitor);
|
||||
if (!mJumpListMgr) return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
RefPtr<ICustomDestinationList> jumpListMgr = mJumpListMgr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче