515994b8ca
The call to RegExpSubclassExec may refer to a different exec method since splitter is newly constructed previously to the call. BUG=v8:5351 Review-Url: https://codereview.chromium.org/2370733003 Cr-Commit-Position: refs/heads/master@{#39774}
13 lines
377 B
JavaScript
13 lines
377 B
JavaScript
// Copyright 2016 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.
|
|
|
|
var re = /[bc]/;
|
|
var str = "baba";
|
|
|
|
assertEquals(["", "a", "a"], str.split(re));
|
|
|
|
// Force slow path.
|
|
re.exec = (string) => RegExp.prototype.exec.call(re, string);
|
|
assertEquals(["", "a", "a"], str.split(re));
|