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

console: bind methods from the prototype chain in Console #24047

Closed
wants to merge 1 commit into from

Commits on Nov 2, 2018

  1. console: bind methods from the prototype chain in Console

    In 6223236 we made the console.Console function construct an object
    with methods from Console.prototype bound to the instance, instead of
    with methods found on the prototype chain to be bound on the instances,
    thus breaking users overriding these methods when subclassing Console
    because they are not expecting this function to construct a
    namespace whose methods are not looked up from the prototype
    chain.
    
    This patch restores the previous behavior since it does not affect
    the characteristics of the global console anyway. So after this patch,
    the Console function still constructs normal objects with function
    properties looked up from the prototype chain but bound to the
    instances always.
    joyeecheung committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    07dbeb6 View commit details
    Browse the repository at this point in the history