Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX release] Ensure proxies have access to getOwner(this). #16493

Merged
merged 1 commit into from
Apr 11, 2018

Commits on Apr 11, 2018

  1. [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.
    rwjblue committed Apr 11, 2018
    Configuration menu
    Copy the full SHA
    645fbe9 View commit details
    Browse the repository at this point in the history