4e14a2a4e6
Flag getters (e.g. RegExp.p.get global) are defined on the prototype and thus we need to use the more general BranchIfFastRegExp here instead of IsFastRegExpNoPrototype. Bug: chromium:800538 Change-Id: Ib6bc8a4fd3bf2f7dd31538c8dbb61814106c184b Reviewed-on: https://chromium-review.googlesource.com/859767 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#50538}
7 lines
265 B
JavaScript
7 lines
265 B
JavaScript
// Copyright 2018 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.
|
|
|
|
RegExp.prototype.__defineGetter__("global", () => true);
|
|
assertEquals("/()/g", /()/.toString());
|