Subj : Re: Spidermonkey:JS_DefinePropertyWithTinyId() on array object sets To : Steve Evans From : Brendan Eich Date : Wed Sep 14 2005 12:41 pm Steve Evans wrote: > I've just upgraded my embedded SpiderMonkey implementation from one dating > back to early 2001 - somewhat overdue, I know! And my app has broken. This is a bug, sorry about it -- could you report it via https://bugzilla.mozilla.org/? It should go in Core (reached via "Other Products"), in the JavaScript Engine component. > My code issues JS_DefinePropertyWithTinyId() on array objects created with > JS_NewArrayObject(). These calls are setting the array length to the value > of the tinyid, which is most unexpected and not what used to happen with my > vintage SpiderMonkey edition. Does anyone know how to prevent this? Why do you use JS_DefinePropertyWithTinyId, btw? Just asking, there is one good reason that I know of (to define several to many tinyid-based properties that share the same getter and possibly setter). The workaround, which you may be able to use forthwith, is to use negative tinyids. That's traditional anyway, to avoid ambiguity with array indexes in a shared class-wide getter or setter (which otherwise would not be able to distinguish a[0] from a.tinyid0). /be .