Hello!
I was looking into removing any use of JSVAL_IS_OBJECT from the
mozilla codebase. Turns out that this function would really win in
usefulness if it wouldn't return true for |null|. So I am proposing to
do that, let JSVAL_IS_OBJECT do what it says, return true _only_ for
JSObjects. Furthermore I propose that JSVAL_TO_OBJECT also only
returns objects and not null, thus probably getting rid of a lot of
null checks.
This way we could also get rid of the terrible !JSVAL_IS_PRIMITIVE
anti-pattern. We use these functions quite a few times and I would
think embedders do that too.
So my question is how useful feasible is this?
~Tom
_______________________________________________
dev-tech-js-engine mailing list
dev-tech-js-engine@...
https://lists.mozilla.org/listinfo/dev-tech-js-engine