Q:

multiple audioCtx addModule() calls freeze Chrome when loaded with inspector open

I'm working on loading AudioWorklet processors from OfflineAudioContext objects. My use case is that I'm trying to pre-generate and display visual data about sounds that I then play for the user.
I'm trying to use an OfflineAudioContext, with the idea being to write processor.js to cache the generated audio, but we're a ways out from that.
I'm using Chrome, and haven't found a way to use AudioContext with FF or Safari yet.
// in Sound object #1
const offlineCtx1 = new OfflineAudioContext(2, 44100, 44100);
offlineCtx1.audioWorklet.addModule("processor.js")
     .then(() => log("first context loaded the processor"));

// ...
// in Sound object #2
const offlineCtx2 = new OfflineAudioContext(2, 44100, 44100);
offlineCtx2.audioWorklet.addModule("processor.js")
    .then(() => log("second context loaded the processor"));

When I try to add the module to the two different contexts, something funny happens. If the inspector is closed, the page seems to load fine. However, if the inspector is open, then the browser tab freezes to some extent. You aren't able to interact with the page or close the tab, but you can do some limited things inside the inspector.
It appears to be some sort of timing problem: if you wait 1000ms or for a user interaction to initiate the second addModule() call, then it works fine. 
Actually, the best way I have found work around it: build a promise chain out of the call to .addModule() and wait for the first one to get back before firing off the next. 
However, in practice this requires weaving Promises through objects in a really silly-looking manner, just to make sure that separate audio context objects aren't being asked to add a module at the same time. I mean, this code-in-the-small looks fine, but it's much more complicated to make sure only one audio context is adding a module in an application:
const offlineCtx1 = new OfflineAudioContext(2, 44100, 44100);
offlineCtx1.audioWorklet.addModule("processor.js")
    .then(() => log("first context loaded the processor") )
    .then(() => {
        const offlineCtx2 = new OfflineAudioContext(2, 44100, 44100);
        return offlineCtx2.audioWorklet.addModule("processor.js")
    })
    .then(() => log("second context loaded the processor") );

Evidently some kind of timing problem that is solved by ensuring that it happens sequentially. I'm on Chrome v 69.0.3497.100 (Official Build) (64-bit)
Anyone have any idea why this is happening? Or suggestions for further debugging? The Chrome inspector doesn't show any helpful info anywhere after it gets horked.
Examples:

Promise chain -- shouldn't freeze your Chrome
No promise chain -- will likely freeze your Chrome tab, if the inspector is open.

A:

Update (10/18/2018): This problem is not reproducible in the latest version. (72.0.3584.0) See more info in the issue entry.
It clearly looks like a bug. I filed one via crbug.com so it can be triaged. It might take a while to track down the culprit because the issue is related to Web Audio, Worker and DevTools.
In the meantime, perhaps you can replace the promise chain with async/await. At least, it will give you the better readability in this case.

