// Flags: --harmony-symbols
+// Fake Symbol if undefined, allowing test to run in non-Harmony mode as well.
+this.Symbol = typeof Symbol != 'undefined' ? Symbol : String;
+
+
var desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
var getProto = desc.get;
var setProto = desc.set;
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --harmony-proxies --es5_readonly
+// Flags: --allow-natives-syntax --es5_readonly
+// Flags: --harmony-proxies
// Different ways to create an object.
o.__proto__ = p;
}
+// Allow Proxy to be undefined, so test can run in non-Harmony mode as well.
+var global = this;
+
function ReadonlyByProxy(o, name) {
- var p = Proxy.create({
+ if (!global.Proxy) return ReadonlyByFreeze(o, name); // Dummy.
+ var p = global.Proxy.create({
getPropertyDescriptor: function() {
return {value: -46, writable: false, configurable: true};
}