gecko/js
Paul Biggar e0fa025e18 Bug 657384: Change new_ parameters to pass-by-copy, not pass-by-const-reference. (r=luke)
new_ [1] took a const reference for each of its parameters. Unfortunately, that
adds const-ness even when the constructor needs non-constness. Unfortunately,
the other way (turning off constness) can lead to excess copying.

According to the Forwarding Problem [2], there is no great solution here. C++
does not have a perfect way to write a function which wraps another function.
So we settle for non-constness, and we must rely on forbidding copying of
expensive objects.

[1] as in cx->new_<T>(p1)
[2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm
2011-05-17 04:25:39 -07:00
..
ipc Bug 537873: Add 'strict' argument to setters defined throughout Firefox. r=brendan 2011-02-09 11:31:40 -08:00
jetpack Bug 642381, part 3: Hoist Maybe into mfbt and eliminate Gecko's use of jstl. r=jorendorff,luke 2011-04-28 17:48:52 -05:00
jsd Bug 646380 - jsd_GetValueString needs to null out 'call' after leaving the cross compartment call (r=sphink) 2011-03-31 15:29:44 -04:00
src Bug 657384: Change new_ parameters to pass-by-copy, not pass-by-const-reference. (r=luke) 2011-05-17 04:25:39 -07:00