-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Ensure proxies have access to
getOwner(this)
.
Prior to this change, when in debug builds, any "proxy" (i.e. something with `unknownProperty`) would _not_ have access to an `owner` object via `getOwner(this)`. This is because of our association with the `FACTORY_FOR` weakmap is only setup for the actual `CoreObject` instance being created, but when `unknownProperty` exists we never expose the "real" `CoreObject` instance and instead expose a native JS `Proxy` (so that we can trap usage of `instance.foo` and properly error). This fix ensures that the native proxy that is returned is also associated with the factory, and can properly access `getOwner(this)` / `._debugContainerKey` / etc.
- Loading branch information
Showing
4 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters