[Webkit-unassigned] [Bug 227636] decodeAudioData crashes tab on iOS Safari

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 2 13:47:24 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227636

--- Comment #4 from Chris Dumez <cdumez at apple.com> ---
(In reply to chrisguttandin from comment #3)
> Thanks for taking a look at this Chris. Is there a way to know the allowed
> maximum memory from within the browser? It would, of course, be possible to
> stagger the calls to decodeAudioData() when knowing the limit is reached.
> 
> During my tests I noticed that directly running decodeAudioData() again
> after the promise return from the previous call resolved didn't work. I
> experimentally came up with a gap of 100ms between each call which seems to
> work.
> 
> I also noticed that the maximum number seems to be different on an iPhone
> and on an iPad.

Sadly, there is not really a way to know from JS. When the system is under memory pressure (or determines that a particular process is above its allowed threshold), it sends WebKit a memory pressure warning and WebKit does its best to free up memory (this includes triggering JavaScript garbage collection). However, this signal/warning is not currently exposed to JS. I am also unaware of any Web API that would give you the amount of free memory.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210702/8ddb50dd/attachment.htm>


More information about the webkit-unassigned mailing list