emberjs / emberjs/ember.js

[Bug] PROXY_CONTENT accesses leak into app code

Open
#19,926 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

### 🐞 Describe the Bug
Code from here: https://github.com/emberjs/ember.js/blob/6b77e9b940a23698201a9d16d1fe420507f048b0/packages/%40ember/-internals/metal/lib/property_get.ts#L16
leaks into app code when working with native Proxy.

### 🔬 Minimal Reproduction
Wrap something in a native proxy, intercept all `get` calls -- access data from a template

### 🤔 Expected Behavior

This should be internal to ember, and could maybe be hidden from consumers via keeping tracking of all PROXY_CONTENT objects in a WeakSet that the above referenced code can check, so that Proxy traps aren't hit.

There are a few other places in ember where this behavior happens, and I think the solution should be similar (potentially unknownProperty, etc)

This could help with the eventual removal of `get` support.

### 🌍 Environment

- Ember: - since long ago
- Node.js/npm: -
- OS: -
- Browser: -

### ➕ Additional Context
Add any other context about the problem here.

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.