Subj : Re: [SpiderMonkey] JS_DefineObject returns null after moving to newest sources To : Brendan Eich From : ggadwa@voyager.net (Brian Barnes) Date : Sun Jul 20 2003 04:49 am On Saturday, July 19, 2003, at 10:48 PM, Brendan Eich wrote: > Brian Barnes wrote: > >> It just throws and error to console and returns JS_FALSE, everytime! >> My guess is that the 1.4 I was using might have been somewhere in the >> middle of a change, and lucky me :) I was using it and depending on >> some behavior that wasn't right. > > > That could be -- I'd have to do CVS archeology to be sure. > >> So, what's the proper way to do this? > > > Two options come to mind: > > 1. Use JSOPTION_STRICT and JSOPTION_WERROR. > > 2. Use JS_SealObject after you've populated an object, to prevent > *any* properties from being added to it. > > I'm wondering why your global resolve returned false still. Did it > return false always? Yeah, I haven't changed that code in months. I think I've found some *really* discrete bug that was fixed (probably inadvertently) in the later version; I'm trying to recreate a test case, but both versions (1.4 vs 1.5) seem to work as they should; so something in the mass of code that is dim3 triggers it. The JS_SealObject is all that I needed. I keep missing these things! If I come up with anything else as to why this happens, I'll mail you, but I think it's a closed issue, and if not, it's got to be a pretty long chain of events, because I have the code in front of me and I can't untangle it enough to recreate the error (in dim3 I can, for sure, but not in a simple console program, even though I pretty much cut and pasted the code out.) This one will have to be lumped in with bigfoot, the loch ness monster, and UFOs. Brendan, do you have access to an OS X (at least 10.2) box anywhere? I'd really love to show you where to d/l dim3 from, so you can take a look. See how far the baby has flown from the nest :) [>] Brian .