New issue
Advanced search Search tips

Issue 820985 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 804159
Owner: ----
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Object.keys modifies object values in certain circumstances

Reported by julian...@gmail.com, Mar 12 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.146 Safari/537.36

Steps to reproduce the problem:
Run this code, perhaps in the dev console:

```
const obj = Object.assign(
  {},
  {
    foo: function bar() {},
  },
);

console.log("before:", Object.values(obj));
Object.keys(obj);
console.log("after:", Object.values(obj));
```

What is the expected behavior?
Should print something like:

```
before: [ƒ]
after: [ƒ]
```

What went wrong?
On Chrome Version 65.0.3325.146 (Official Build) (64-bit) (Mac, Windows or Linux) it prints:

```
before: [ƒ]
after: "foo"
```

So something object keys and values appear to get mixed up.

Did this work before? Yes 64

Chrome version: 65.0.3325.146  Channel: stable
OS Version: OS X 10.12.6
Flash Version: 

When using Object.entries the same problem occurs, however when logging the object to the console it seems fine.

The problem doesn't happen when using a number or string instead of a function as object value, and only appears to happen when using Object.assign.
 

Comment 1 by woxxom@gmail.com, Mar 12 2018

Duplicate of  issue 804159 .
The fix should be delivered in the next update of 65.
Labels: Needs-Bisect Needs-Triage-M65

Comment 3 by adamk@chromium.org, Mar 13 2018

Mergedinto: 804159
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment