[JS-internals] A word of warning when using the JS_DECLARE_NEW_METHODS macro

Chris Leary cdleary at mozilla.com
Wed Dec 14 15:31:53 PST 2011


Dumb question: instead of having people trip over this in the future
should we just add the exponential number for overloads for some
reasonably small number of parameters?

- Leary

On Fri, Dec 9, 2011 at 9:00 PM, Jeff Walden <jwalden+nmo at mit.edu> wrote:
> Don't use it to construct a class whose constructor takes a non-const
> reference.  Things will not work as you expect them to work.  Why?  Read
> this, particularly the bit near "exponentially".
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1690.html
>
> Good times.  Here's hoping you won't waste half a day on this like I did.
>
> I wonder if there's some awful template we could use to verify that a method
> mapping to a constructor with a non-const reference is never called.
>  Probably.  I bet it'd about double the already massive awfulness of that
> macro.
>
> Jeff
> _______________________________________________
> dev-tech-js-engine-internals mailing list
> dev-tech-js-engine-internals at lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals


More information about the dev-tech-js-engine-internals mailing list