// 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.vara="a";for(vari=0;i<5;i++)a+=a;varb="b";for(vari=0;i<23;i++)b+=b;functionreplace(){a.replace(/a/g,function(){returnb});}assertThrows(replace,RangeError);