Subj : Re: XDR, unimplemented bytecode, JSEqualityOp in JSClass ? To : bubbfree From : Brendan Eich Date : Fri May 27 2005 11:42 pm bubbfree@gmail.com wrote: > I'm encrypting scripts that have been XDR'd for my software so that 3rd > party authors can securely distribute and sell their scripts to my > users. The software on the user's side decrypts and runs the script > from the XDR data. > > This was working fine until I upgraded to the trunk release of > SpiderMonkey from RC3. The users (using RC3) get 'unimplemented > Javascript bytecode 188' with scripts that were XDR'd with the later > version of SpiderMonkey. > > Is there any way to keep backwards compatibility using XDR? I have a > feeling this was because of a change in my class from JSClass to > JSExtendedClass... needed the JSEqualityOp in JSExtendedClass. That's not backward compatibility. Backward compatibility is when you run old bytecode on a new engine, and that should work. What you seem to want is forward compatibility, which is new bytecode on an old engine, which is nothing we've ever promised. See http://www.gotdotnet.com/team/changeinfo/default.aspx for definitions of backward vs. forward compatibility. > Is there any way that can I get the equivalent behavior of JSEqualityOp > in a JSClass ? This is an unrelated question, right? Try JSExtendedClass, which must have the JSCLASS_IS_EXTENDED flag set. /be .