Fix threading races on HRTFElevation::audioBusMap
Fix threading races on HRTFElevation::audioBusMap

According to the crash report (https://cluster-fuzz.appspot.com/testcase?key=6291334197411840),
there is a threading race in HRTFElevation::getConcatenatedImpulseResponsesForSubject.

static PassRefPtr<AudioBus> getConcatenatedImpulseResponsesForSubject(...) {
    typedef HashMap<String, RefPtr<AudioBus> > AudioBusMap;
    DEFINE_STATIC_LOCAL(AudioBusMap, audioBusMap, ());
    RefPtr<AudioBus> bus;
    AudioBusMap::iterator iterator = audioBusMap.find(subjectName); // (A)
    if (iterator == audioBusMap.end()) {
        ...;
        audioBusMap.set(subjectName, bus);  // (B)
    }
}

It's possible that:

(1) Thread 1 executes (A)
(2) Thread 2 executes (A)
(3) Thread 1 executes (B)
(4) Thread 2 executes (B) and crashes.

This CL protects accesses to the AudioBusMap with mutex.

BUG=270758
No tests because the crash depends on threading races and thus not reproducible.

Review URL: https://chromiumcodereview.appspot.com/23613007

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@157273 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs