Retrieving JS HeapSize from webkit

Johan Vos johan.vos at
Thu Oct 25 21:04:44 UTC 2018

In the current webkit implementation, there is no boundary on the size of
the JavaScript heap (afaik). As a consequence, a memory leak or malicious
code in a JavaScript function can cause a whole system to crash.

In order to at least allow applications to be informed about the current
size of the JavaScript heap (and take action if it exceed an
application-specific threshold), I was playing with adding a call to
retrieve the current heapsize.
My experiment for this is at

This works fine, but it is drastic as it adds a method to WebEngine.
In order to make WebEngine more robust, we might need more interaction
between WebKit and WebEngine, and I'm not in favour of randomly adding
methods hence I think we need a more structured approach to this issue.


- Johan

More information about the openjfx-dev mailing list