question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object.prototype should be an immutable prototype exotic object

See original GitHub issue

You should not be able to change its prototype with Object.setPrototypeOf, __proto__, or any other means. See also: https://github.com/tc39/ecma262/pull/308.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bterlsoncommented, Apr 26, 2016

I believe @ljharb was mistaken - it should be a TypeError in all modes. He confirms this in his most recent comment.

0reactions
dilijevcommented, Apr 26, 2016

Okay, thanks for your patience in bringing me up to speed, here. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Object.prototype should be an immutable prototype exotic object
Object.setPrototypeOf(Object.prototype, {}) should fail silently in sloppy mode and throw in strict mode, as should any other mechanism of ...
Read more >
Object.prototype.__proto__ - JavaScript - MDN Web Docs
Exceptions. Thrown if attempting to set the prototype of a non-extensible object or an immutable prototype exotic object, such as Object. prototype or...
Read more >
699831 - Immutable prototype exotic objects are accepted by ...
The current ECMAScript draft says that objects immutable prototype exotic objects, like Object.prototype, meet that criterion.
Read more >
javascript - Uncaught TypeError: Immutable prototype object ...
This is new in ES7 (aka ES2016). The builtin prototype object Object.prototype is now an Immutable Prototype Exotic Objects which has its ...
Read more >
Freezing prototypes details - ECMAScript Proposals
ECMA-262 defines Immutable Prototype Exotic Objects, which are objects whose prototype cannot be changed but which still may be extensible.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found