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] Fix cyclic references on Array.prototype #17374

Merged

Commits on Dec 14, 2018

  1. Configuration menu
    Copy the full SHA
    3029e9d View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2018

  1. [BUGFIX release] Ensure properties on Array.prototype are non-enumera…

    …ble.
    
    This fixes the following example case:
    
    ```js
    $.extend(true, {}, {a:['a']})
    ```
    Prior to this change, the above would trigger maximum call stack error.
    This is because the `[]` computed property added to the array prototype
    references itself, which ultimately makes `$.extend` (and other deep
    equality style comparisons) fail.
    rwjblue committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    98afaff View commit details
    Browse the repository at this point in the history
  2. Avoid extended array directly in tests.

    Unfortunately, `class Foo extends Array{}` doesn't work well with older
    browsers (and would even require changes in our transpilation for
    production builds for modern ones).
    
    The actual test doesn't care if its running on an Array (without the
    fixes in this PR this modified test still fails the same way).
    rwjblue committed Dec 15, 2018
    Configuration menu
    Copy the full SHA
    6e74ef8 View commit details
    Browse the repository at this point in the history