Bug 1598114 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Thank you for having a look, Steve.

> safely say that the refcount will not drop to zero and so this case will not trigger a GC.

The refcount can drop to zero, so I assume the choice is one of:
1. We need to be sure that `~MediaStream` can't trigger GC,
2. We copy from a temporary intermediate buffer, or
3. We use a different kind of array buffer with client-provided contents so that the buffer can be accessed via means other than `JS_GetFloat32ArrayData()`.
Thank you for having a look, Steve.

> safely say that the refcount will not drop to zero and so this case will not trigger a GC.

The refcount can drop to zero, so I assume the choice is one of:
1. We need to be sure that `~MediaStream` can't trigger GC,
2. We copy from a temporary intermediate buffer,
3. We use a different kind of array buffer with client-provided contents so that the buffer can be accessed via means other than `JS_GetFloat32ArrayData()`, or
4. Redesign `GetValuesAtTime()` to avoid side effects, and use a different method to purge old events.

Back to Bug 1598114 Comment 9