-
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.
deps: V8: cherry-pick 8361fa58 from upstream
Original commit message: [runtime] Fix derived class instantiation Bug: chromium:806388 Change-Id: Ieb343f0d532c16b6102e85222b77713f23bacf8c Reviewed-on: https://chromium-review.googlesource.com/894942 Reviewed-by: Igor Sheludko <[email protected]> Commit-Queue: Camillo Bruni <[email protected]> Cr-Commit-Position: refs/heads/master@{#50990} PR-URL: #21294 Reviewed-By: Myles Borins <[email protected]>
- Loading branch information
Showing
4 changed files
with
42 additions
and
9 deletions.
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
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,20 @@ | ||
// 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 --enable-slow-asserts --expose-gc | ||
|
||
class Derived extends Array { | ||
constructor(a) { | ||
// Syntax Error. | ||
const a = 1; | ||
} | ||
} | ||
|
||
// Derived is not a subclass of RegExp | ||
let o = Reflect.construct(RegExp, [], Derived); | ||
o.lastIndex = 0x1234; | ||
%HeapObjectVerify(o); | ||
|
||
gc(); | ||
%HeapObjectVerify(o); |