Domanda

Consider the following code:

http://jsfiddle.net/NVcwZ/

The onaudioprocess EventHandler process is only called a few times. If the EventHandler is made global, on the other hand, it continues to be called as expected.

http://jsfiddle.net/NVcwZ/1/

Why must the onaudioprocess EventHandler be global?

It seems this is a problem with the garbage collector, which appears to be eliminating the EventHandler after a few calls. Various posts on Google Code and Mozilla Support allude to this.

Does anyone know the current status of this issue, and when, if at all, it will be resolved?

È stato utile?

Soluzione

I know there's a WebKit bug for this: https://bugs.webkit.org/show_bug.cgi?id=112521

I feel like I remember it being fixed in Chrome, but I just saw the behavior you described when I tried the first JSFiddle link — so I must be misremembering.

I couldn't find a link to a Chromium bug, but maybe I just didn't look hard enough.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top