Subj : Re: Narrowed the problem down to...and solved To : Sterling Bates From : Brendan Eich Date : Fri Nov 07 2003 10:07 pm Sterling Bates wrote: >Turns out the breakpoint is raised anytime my code is anything but >perfect -- and that can be arbitrary. > >In one instance I was using a JS_NewString(...) to create a JSString, but >the problem went away when I changed that to JS_NewStringCopyZ. > > What was arbitrary in that? If you passed off ownership of string memory via JS_NewString but then reneged by freeing the storage yourself, the memory would be double-freed. A breakpoint is one of the kinder responses to that ;-). >In another instance (discussed in this thread) the JS_DefineObject problem >was caused by including the wrong Delphi file. I had the right structure >definition in both files, but I guess Delphi differentiates between >identical types from two different files. > > That's plausible, and good to know. >Anyway, thought I'd post the solutions in case anyone else out there finds >the breakpoint issue. > > Is anyone using your bridge yet? Keep us posted. /be .