| 1 |
// This Source Code Form is subject to the terms of the Mozilla Public |
| 2 |
// License, v. 2.0. If a copy of the MPL was not distributed with this |
| 3 |
// file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 4 |
|
| 5 |
// Regression test for bug https://bugzilla.mozilla.org/show_bug.cgi?id=434041 |
| 6 |
js> function add(_object, _key, _value) { |
| 7 |
> _object[_key] = _value; |
| 8 |
> } |
| 9 |
js> var o = {}; |
| 10 |
js> add(o, 'a', 'b'); |
| 11 |
js> o.toSource(); |
| 12 |
({a:"b"}) |
| 13 |
js> add(o, 3, 'c'); |
| 14 |
js> o.toSource(); |
| 15 |
({a:"b", 3:"c"}) |