Brendan suggests just deleting the feature. Mozilla isn't using it. Does
anyone need it?
-j
I don't ever recall seeing it documented on devmo wiki. Apparently it
is. It seems relatively easy to work round by setting JSPROP_SHARED on
all properties manually if you need it.
-ash
The flag *does* have potential perf gains for embedders. Consider the case
of a BLOB type: all properties are shared, and yet we can't reasonably mark
them that way individually. So, not having JSPROP_SHARED means that BLOBs
have un-needed value slots, which could in turn entrain garbage.
Additionally, if the BLOB is immutable, we also have all properties
permanent. If we had a JSCLASS_ALL_PROPERTIES_ARE_PERMANENT flag, there is
another engine optimization we might be able to take advantage of. (And --
FWIW, I have immutable BLOBs that can share backing store: extra prop
copying because of jsapi is unfortunate)
Incidentally, it's worth noting that JSCLASS_SHARE_ALL_PROPERTIES has a bit
of a nasty, undocumented poison pill: a class declared like this cannot
have any native methods. That really... sucks.
So, what to do? From my POV, deleting it is not the end of the world,
although I *am* interested in effecient BLOB types. I am guessing GC
entrainment can probably be solved with *vp=JSVAL_NULL in the setter, and as
for efficiency, I haven't proved that it matters, so POITROAE and all that.
I also did a half-thorough survey of the web, and could not find any
projects using the flag meaningfully.
By the way, was this discovery triggered by soubok? According to the jslibs
source repo, it's been giving him grief recently:
http://code.google.com/p/jslibs/source/browse/trunk/src/jsstd/objex.cpp?spec=svn2910&r=2910
Wes
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
--
Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
Wes
I thought it was added for XPConnect, since all of the wrappednative's
properties are shared.
Mike