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

util: correctly inspect Map/Set Iterators #3119

Merged
merged 2 commits into from
Oct 6, 2015

Commits on Oct 6, 2015

  1. util: fix check for Array constructor

    In the event an Array is created in a Debug context, the constructor
    will be Array, but !== Array. This adds a check
    constructor.name === 'Array' to handle edge cases like that.
    
    PR-URL: nodejs#3119
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    evanlucas committed Oct 6, 2015
    Configuration menu
    Copy the full SHA
    089d688 View commit details
    Browse the repository at this point in the history
  2. util: correctly inspect Map/Set Iterators

    Previously, a MapIterator or SetIterator would
    not be inspected properly. This change makes it possible
    to inspect them by creating a Debug Mirror and previewing
    the iterators to not consume the actual iterator that
    we are trying to inspect.
    
    This change also adds a node_util binding that uses
    v8's Value::IsSetIterator and Value::IsMapIterator
    to verify that the values passed in are actual iterators.
    
    Fixes: nodejs#3107
    PR-URL: nodejs#3119
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    evanlucas committed Oct 6, 2015
    Configuration menu
    Copy the full SHA
    8853388 View commit details
    Browse the repository at this point in the history