forked from crosswalk-project/v8-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[proxy] Reload the initial map after prototype lookup on constructable
Proxy. If a constructable Proxy changes the target's prototype during the prototype lookup the target's initial map stays uninitialized half-way during object construction. LOG=n BUG=chromium:578039 Review URL: https://codereview.chromium.org/1586203003 Cr-Commit-Position: refs/heads/master@{#33359}
- Loading branch information
1 parent
9b7035d
commit ec30425
Showing
2 changed files
with
18 additions
and
0 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
14 changes: 14 additions & 0 deletions
14
test/mjsunit/regress/regress-crbug-578039-Proxy_construct_prototype_change.js
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,14 @@ | ||
// 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. | ||
|
||
|
||
function target() {}; | ||
|
||
var proxy = new Proxy(target, { | ||
get() { | ||
// Reset the initial map of the target. | ||
target.prototype = 123; | ||
}}); | ||
|
||
new proxy(); |