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

repl: Enable tab completion for global properties when useGlobal is false #7369

Closed
wants to merge 5 commits into from
Closed

repl: Enable tab completion for global properties when useGlobal is false #7369

wants to merge 5 commits into from

Commits on Jun 27, 2016

  1. repl: Enable tab completion for global properties.

    When `useGlobal` is false, tab completion in the repl does not enumerate
    global properties. Instead of just setting these properties blindly on
    the global context, e.g.
    
        context[prop] = global[prop]
    
    Use `Object.defineProperty` and the property descriptor found on
    `global` for the new property in `context`.
    
    Also addresses a previously unnoticed issue where `console` is writable
    when `useGlobal` is false.
    
    Ref: #7353
    lance committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    dcaf20b View commit details
    Browse the repository at this point in the history
  2. repl: Do not copy builtin properties to context.

    When `useGlobal` is false, all of the properties on `global` are copied
    to the new context (excluding `console` and `global`). Since
    `Object.getOwnPropertyNames()` returns all properties, not just
    enumerable ones, builtin properties on `global` are returned. We need to
    filter those out.
    lance committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    12902dd View commit details
    Browse the repository at this point in the history
  3. repl: remove unused test code.

    lance committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    b4d8de7 View commit details
    Browse the repository at this point in the history
  4. repl: Remove context.global.global = context.

    This existed in the original `repl.js` code, but it's not clear what the
    purpose is. It appears to be redundant.
    lance committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    0991efe View commit details
    Browse the repository at this point in the history
  5. repl: Check Intl existence before test.

    If the binary has been built with `./configure --without-intl` then the
    `Intl` builtin type will not be available in a repl runtime. Check for
    this in the test.
    lance committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    b1981b1 View commit details
    Browse the repository at this point in the history