[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Retrieving JS HeapSize from webkit
From:       Johan Vos <johan.vos () gluonhq ! com>
Date:       2018-10-25 21:04:44
Message-ID: CABxFH2Ei73yFj9A_+fXsFBJn7Y2Kb-6O+F8_cpcvPmGMOgq2hw () mail ! gmail ! com
[Download RAW message or body]

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
https://github.com/johanvos/openjdk-jfx/commit/1b3d79a685b014d229e82d79d67ed4c3ea54a77d

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.

Thoughts?

- Johan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic