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 02:53 am On Saturday, July 19, 2003, at 08:15 PM, Brendan Eich wrote: > I don't think the engine changed. Is it possible you changed something > in the order of initialization? Are you using lazy > JS_ResolveStandardClass now when you used eager JS_InitStandardClasses > (before anything else was done on the global object) before? Nope -- I have the compiled lib for 1.4 and for 1.5. If I swap them, it works, swap them back, it breaks. > I'm not sure how this could have ever worked, though -- if your global > object was of a class that had scripts_reoslve_object as its resolve > hook, and that hook always returned false, then you should have seen > silent failures all along, from anything attempting to make a new > object. > > Maybe scripts_resolve_object doesn't return false unconditionally, > though. I'd have to see it to say more. 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. OK, let's start over then. What I want to do is stop people from changing the objects which I create. They mostly came up because people were misspelling properties and adding them instead of changing them and those were hard errors to track down! So, what's the proper way to do this? [>] Brian .