New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 915867 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Console displays inherited getter as own property

Reported by a.d.be...@gmail.com, Dec 17

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.85 Safari/537.36 Vivaldi/2.2.1388.34

Steps to reproduce the problem:
Run the code
```js
var Foo = function(){};

Object.defineProperty(Foo.prototype,'x',{
    get(){
        return 3;
    }
});

var foo = new Foo();

console.dir(foo);
```

Also happens with `console.log` instead of `console.dir`, or when there's a setter alongside the getter.

What is the expected behavior?
The log should show

Foo {
    __proto__:{
        constructor: ƒ (),
        x: 3,
        __proto__: Object
    }
}

What went wrong?
The log shows

Foo {
    x: 3,
    __proto__:{
        constructor: ƒ (),
        x: 3,
        __proto__: Object
    }
}

It includes the `x` property (first shown as "(...)" with the "invoke property getter" tooltip) on the object itself, not only on the prototype.

Did this work before? Yes 

Chrome version: 70.0.3538.110  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Found at https://stackoverflow.com/questions/53816004/what-happens-when-invoke-object-defineproperty-for-a-functions-prototype
 
Bisected to 6f82c99eb737fddae78fc59fbb4dcff1be607ea2
"Show accessor property values in frontend"
Landed in 30.0.1551.0 via r209079
Labels: Needs-Bisect Needs-Triage-M70
Cc: vamshi.kommuri@chromium.org eseidel@chromium.org
Labels: -Needs-Bisect -Type-Bug-Regression Triaged-ET Target-73 M-73 FoundIn-71 FoundIn-73 FoundIn-72 OS-Linux OS-Mac Type-Bug
Status: Untriaged (was: Unconfirmed)
Thanks for filing the issue!

Able to reproduce the issue on reported chrome version 70.0.3538.110 and on the latest canary 73.0.3643.0 using Windows 10, Ubuntu 14.04 and Mac 10.14.1
As the issue is seen from M60(60.0.3112.0) considering it as Non-Regression and marking it as Untriaged.

CC'ing eseidel@ from comment#1, for further inputs.
Owner: einbinder@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment