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

src: avoid prototype access in binding templates #47913

Closed
wants to merge 1 commit into from

Commits on May 23, 2023

  1. src: avoid prototype access in binding templates

    This patch makes the binding templates ObjectTemplates, since we
    don't actually need the constructor function. This also avoids
    setting the properties on prototype, and instead initializes them
    directly on the object template.
    
    Previously the initialization was similar to:
    
    ```
    function Binding() {}
    Binding.prototype.property = ...;
    module.exports = new Binding;
    ```
    
    Now it's similar to:
    
    ```
    module.exports = { property: ... };
    ```
    joyeecheung committed May 23, 2023
    Configuration menu
    Copy the full SHA
    be2d7ed View commit details
    Browse the repository at this point in the history