Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * Objects as arguments are passed by reference
6 *
7 * @path ch13/13.2/S13.2.1_A4_T2.js
8 * @description Adding new string property to a function argument within the function body,
9 * where explicit argument is an object defined with "__obj={}"
10 */
12 function __func(__arg){
13 __arg.foo="whiskey gogo";
14 }
16 var __obj={};
18 __func(__obj);
20 //////////////////////////////////////////////////////////////////////////////
21 //CHECK#1
22 if (__obj.foo !== "whiskey gogo") {
23 $ERROR('#1: __obj.foo === "whiskey gogo". Actual: __obj.foo ==='+__obj.foo);
24 }
25 //
26 //////////////////////////////////////////////////////////////////////////////