chakra-core / chakra-core/ChakraCore

Global declarations created inside eval should not change configurability of existing properties

Open
#3,404 0 comments 0 reactions 1 assignee Claimed by @boingoing View on GitHub
Bug Severity: 2
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

```js
Object.defineProperty(this, 'f', {
enumerable: true,
writable: true,
configurable: false
});

print(JSON.stringify(Object.getOwnPropertyDescriptor(this, 'f')));
eval('function f() { return 2222; }');
print(JSON.stringify(Object.getOwnPropertyDescriptor(this, 'f')));
```

Expected: descriptor doesn't change
Actual: descriptor changes from configurable false to configurable true

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.