Subj : Re: Byte Arrays in JavaScript To : Sajid Raza From : Brendan Eich Date : Mon May 24 2004 02:57 pm Sajid Raza wrote: > Brendan Eich wrote: > >> By using the resolve hook. > > Thanks Brendan, finally got it. Previously, I didn't understand that the > JSClass ops provide a hooking mechanism into the script engine's > property retrieval and resolution functionality. > > It puzzled me to no end how my JSClass.getProperty function would > magically produce the property value in the rval parameter. Running the > console interpreter in gdb and tracing out how property values are > retrieved prior to calling OBJ_GET_PROPERTY helps explain things. When you start using JSPROP_SHARED, you'll find that the "last got" value won't be "cached" -- precisely because JSPROP_SHARED turns off the allocation of a jsval slot for the property. So you'll want to have your byte-array value storage hooked up at that point. ;-) /be .