On Tue, Feb 10, 2015 at 10:27 AM, Jason Hill <jamesjasonh...@gmail.com> wrote:
> 1 - Is it possible to update an object properties created on the JS land ? > What I need to do is that setting private data / data slot into any Object > created on the JS land. > It is possible to store per-object information (in a WeakMap), but it's not possible to get a list of every object created by JS code, or get a callback every time an object is created. (If I'm wrong about this someone will correct me...) 2 - How to catch the 'finalizer' call for an Object created on the JS land? > You can't. The engine "knows" that some objects, like plain Object objects, do not have finalizers. The garbage collector uses that knowledge to skip a lot of work during GC, including calling finalizers. So even if you were to find all the built-in JSClasses and patch their finalize fields (do not attempt this), sometimes your finalizers would not be called. If you can clarify what you're trying to accomplish, there may be other ways to get there. -j _______________________________________________ dev-tech-js-engine-internals mailing list dev-tech-js-engine-internals@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals