Improve RegExp.prototype.compile (#2971)
This patch fixes the return value of the routine also fixes several incorrect regression-tests due to the previously incorrect [[RegExpMatcher]] internal slot check. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -12,5 +12,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
new (new (new RegExp().constructor)().constructor)().constructor.prototype.toString()
|
||||
RegExp().constructor().constructor.prototype.compile(RegExp.prototype)
|
||||
new (new (new RegExp().constructor)().constructor)().constructor.prototype.toString();
|
||||
|
||||
try {
|
||||
RegExp().constructor().constructor.prototype.compile(RegExp.prototype);
|
||||
assert(false);
|
||||
} catch (e) {
|
||||
assert(e instanceof TypeError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user