[regexp-escape] Implement and stage RegExp.escape

Bug: 353856236
Change-Id: I24deb20ea4fe1a9b49c13ed0f7e038dea9892354
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6254804
Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98671}
This commit is contained in:
Shu-yu Guo 2025-02-12 11:19:24 -08:00 committed by v8-test262-autoroller@chromium.org
parent c23db8061d
commit bce0db2c30

View File

@ -0,0 +1,9 @@
// Copyright (C) 2025 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Unescaped surrogate pairs
features: [RegExp.escape]
---*/
assert.sameValue(RegExp.escape("\ud800\udc00"), "\ud800\udc00", 'Unescaped surrogate pair');