-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #18522 Refs: v8/v8@6.4.388.40...6.4.388.41 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
- Loading branch information
1 parent
a52b7a2
commit 1f76482
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// 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. | ||
|
||
// Flags: --allow-natives-syntax --expose-gc | ||
|
||
|
||
class Derived extends RegExp { | ||
constructor(a) { | ||
// Syntax Error | ||
const a = 1; | ||
} | ||
} | ||
|
||
let o = Reflect.construct(RegExp, [], Derived); | ||
%HeapObjectVerify(o); | ||
// Check that we can properly access lastIndex. | ||
assertEquals(o.lastIndex, 0); | ||
o.lastIndex = 1; | ||
assertEquals(o.lastIndex, 1); | ||
o.lastIndex = 0; | ||
gc(); |