summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/regress/regress-607863.js
blob: 14a4ce3d3a4e50eec94bc327726624545ccf5f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// |reftest| fails-if(!xulRuntime.shell)
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
 * Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/licenses/publicdomain/
 */

var sandbox = evalcx('');
var foreign = evalcx('({ get f() { return this; }, set x(v) { result = this } })', sandbox);
var local = Object.create(foreign);

reportCompare(local, local.f, "this should be set correctly in getters");
local.x = 42;
reportCompare(local, sandbox.result, "this should be set correctly in setters");