v8/test/mjsunit/regress/regress-6186.js
Adam Klein 8b8295dbb9 [regexp] Handle a function Proxy passed to String.prototype.replace
Bug: v8:6186
Change-Id: If460313ee861f826a89bc7390a5e35d43d175622
Reviewed-on: https://chromium-review.googlesource.com/466549
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44390}
2017-04-04 18:48:56 +00:00

6 lines
231 B
JavaScript

// Copyright 2017 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.
assertEquals("b", "a".replace(/a/, new Proxy(() => "b", {})));