Created attachment 476412 [details] [diff] [review] Change GetPropertyNames to take its out-parameter by address, not by non-const reference. When a function takes an out-parameter by reference, it makes it harder to see where things are being modified at call sites. SpiderMonkey has a policy of passing outparams by address. GetPropertyNames and the various function templates that implement it do not follow this convention. The new 'fix' js::ObjectOps member for bug 492849 should not propagate this error.
Comment on attachment 476412 [details] [diff] [review] Change GetPropertyNames to take its out-parameter by address, not by non-const reference. Thanks, for some reason I let this pass, even though I'm the grumpy grandpa of "non-const-refs for out/inout params considered harmful". Gotta stay grumpy! /be
Nothing grumpy about it. For what it's worth, that convention is part of the Google C++ style as well. Pretty operator-overloading-based domain-specific languages are perhaps an exception.
When I first loaded cfront 0.9 off magtape in 1985, it was clear that operators (complex, the canonical example) were the strong motivation for mutable reference parameters. /be