// Copyright 2014 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.functiontestError(error){// Reconfigure e.stack to be non-configurablevardesc1=Object.getOwnPropertyDescriptor(error,"stack");Object.defineProperty(error,"stack",{get:desc1.get,set:desc1.set,configurable:false});vardesc2=Object.getOwnPropertyDescriptor(error,"stack");assertFalse(desc2.configurable);assertEquals(desc1.get,desc2.get);assertEquals(desc2.get,desc2.get);}functionstackOverflow(){functionf(){f();}try{f()}catch(e){returne;}}functionreferenceError(){try{g()}catch(e){returne;}}testError(referenceError());testError(stackOverflow());