Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

[email protected] Object.defineProperty behaves incorrectly for functions #14310

Closed
antonioMerkulov opened this issue May 25, 2016 · 2 comments
Labels

Comments

@antonioMerkulov
Copy link

There was an issue when Object.defineProperty works incorrectly in PhantomJS. And now it works OK for objects but not for functions...

The following behaves correctly in browsers and node.js, but incorrectly in PhantomJS:

var foo = function () { console.log('foo function'); };
Object.defineProperty(foo, 'name', {value: 'bar', configurable: true});
console.log(foo.name); //bar

browser example:
browser

node example:
node

phantomjs example:
phantomjs

@elias-winberg
Copy link
Contributor

The 'name' attribute seems to be non-configurable and read-only by default in PhantomJS. The actual error is 'TypeError: Attempting to configurable attribute of unconfigurable property.', but the REPL (read–eval–print loop) prints "'%1' is a cyclic structure" whenever a TypeError occurs.

@stale
Copy link

stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this as completed Dec 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants