On Tuesday, February 24, 2015 at 5:10:43 PM UTC+1, Boris Zbarsky wrote: > On 2/24/15 11:06 AM, obastemur wrote: > > Private slot holds the native wrapper object. > > Backing up for a sec.... > > Do you need to associate "native wrapper objects" to arbitrary JS > objects? Or only some JS objects? How do you determine which objects > need a "native wrapper object"? > > -Boris
Imagine a situation below; JS: var myObj = { a:1 }; NATIVE_METHOD_1(myObj); .. .. NATIVE_METHOD_2(myObj); .. C++ FS_OBJECT.NATIVE_METHOD_1 { save a pointer to 'this(fs_object)' into argument 0 } NATIVE_METHOD_2 { read the reference .. ahha (it has fs_object) .. } .. Hope it's clear. This is how node.js / jxcore works. Right now it's not a big deal since I've implemented some tricks around the issue but this is a very common use and affects performance etc... _______________________________________________ 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