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

Backport V8 5.1 to v6.x #8054

Merged
merged 21 commits into from
Aug 25, 2016
Merged

Backport V8 5.1 to v6.x #8054

merged 21 commits into from
Aug 25, 2016

Commits on Aug 25, 2016

  1. deps: update V8 to 5.1.281.75

    Pick up the latest branch-head for V8 5.1. This branch brings in
    improved language support and performance improvements. For full
    details: http://v8project.blogspot.com/2016/04/v8-release-51.html
    
    * Picks up the latest branch head for 5.1 [1]
    * Edit v8 gitignore to allow trace_event copy
    * Update V8 DEP trace_event as per deps/v8/DEPS [2]
    
    [1] https://chromium.googlesource.com/v8/v8.git/+/5.1.281.75
    [2] https://chromium.googlesource.com/chromium/src/base/trace_event/common/+/c8c8665
    
    Introduces a semver-minor overload of v8::Function::New() for use
    by v8_inspector.
    
    PR-URL: nodejs#8054
    Refs: nodejs#7016
    Refs: nodejs#7586
    Refs: nodejs#7615
    Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net>
    Reviewed-By: thealphanerd - Myles Borins <myles.borins@gmail.com>
    Reviewed-By: mhdawson - Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: evanlucas - Evan Lucas <evanlucas@me.com>
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    abbad66 View commit details
    Browse the repository at this point in the history
  2. deps: limit regress/regress-crbug-514081 v8 test

    regress/regress-crbug-514081 allocates a 2G block of memory
    and if there  are multiple variants running at the
    same time this can lead to crashes, OOM kills or
    the OS failing to allocate memory.  This patch
    limits us to running a single variant of the test
    
    Fixes: nodejs#6340
    PR-URL: nodejs#6678
    Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Fedor Indutny <fedor@indutny.com>
    mhdawson authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    7af2f63 View commit details
    Browse the repository at this point in the history
  3. deps: cherry-pick 1ef7487b from v8 upstream

    Original commit message:
    
         Improved diagnostic message for JS heap out of memory
    
         This patch replaces the unused 'take_snapshot' parameter on
         FatalProcessOutOfMemory() with a 'is_heap_oom' parameter.
         The parameter is set to true on error paths where the
         JS heap is out of memory, as distinct from a malloc()
         failure i.e. process out of memory.  The message output to
         stderr or passed to embedding applications via FatalErrorCallback
         is 'Javascript heap out of memory' rather than
         'process out of memory'.
    
         BUG=
    
         R=jochen@chromium.org, verwaest@chromium.org, michael_dawson@ca.ibm.com
    
         Review URL: https://codereview.chromium.org/1873443002
    
         Cr-Commit-Position: refs/heads/master@{nodejs#35431}
    
    We'd like this in 6.x to help with diagnosing customer problems.
    It provides a better message on OOM so that it is easier to
    be able to tell whether the OOM was due to heap exhaustion
    or running out of native memory.
    
    PR-URL: nodejs#6218
    Reviewed-By: Ben Noordhuis <ben@strongloop.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    mhdawson authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    b2f7c32 View commit details
    Browse the repository at this point in the history
  4. v8: warn in Template::Set() on improper use

    The next major release will make it a fatal error to use non-primitive
    values in function templates and object templates.
    
    Print a warning that includes the C and JS stack trace to tell people to
    upgrade their add-ons.  The C stack trace is only printed on platforms
    that support it (the BSDs, OS X and Linux+glibc.)
    
    The warning can be disabled with the new `--nowarn_template_set` flag.
    
    Refs: nodejs#6216
    PR-URL: nodejs#6277
    Reviewed-By: James M Snell <jasnell@gmail.com>
    bnoordhuis authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    44f781d View commit details
    Browse the repository at this point in the history
  5. deps: backport IsValid changes from 4e8736d in V8

    V8 erroneously did null pointer checks on `this`.
    It can lead to a SIGSEGV crash if node is compiled with GCC 6.
    Backport relevant changes from [1] that fix this issue.
    
    [1]: https://codereview.chromium.org/1900423002
    
    Fixes: nodejs#6272
    PR-URL: nodejs#6544
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
    targos authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    a91f6b8 View commit details
    Browse the repository at this point in the history
  6. repl: fix repl after V8 upgrade

    V8 improved the error message for illegal token in
    v8/v8@879b617b. This breaks the recoverable
    error handling in repl.
    
    Ref: nodejs#6482
    
    PR-URL: nodejs#7016
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    ofrobots committed Aug 25, 2016
    1 Configuration menu
    Copy the full SHA
    66e66e5 View commit details
    Browse the repository at this point in the history
  7. test: fix tests after V8 upgrade

    * Changes to messages.
    * V8 enabled proxy support by default. The --harmony_proxies flag is
      now gone.
    
    PR-URL: nodejs#6482
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    cda8bfc View commit details
    Browse the repository at this point in the history
  8. dtrace: fix ustack helper for V8 5.1

    V8 5.1 changes the layout of stack frames.
    
    PR-URL: nodejs#6482
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    b1922e7 View commit details
    Browse the repository at this point in the history
  9. build: don't include V8 from node.gyp

    It is no longer necessary now that libplatform/libplatform.h uses proper
    includes.
    
    PR-URL: nodejs#7016
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    targos authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    dcd0655 View commit details
    Browse the repository at this point in the history
  10. deps: revert removal of V8::PromiseEvent

    The removal of the promise debug event is an API/ABI breaking change.
    
    Ref: https://codereview.chromium.org/1833563002
    Ref: #23
    
    PR-URL: nodejs#7016
    Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Matt Loring authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    06a6c03 View commit details
    Browse the repository at this point in the history
  11. deps: bring in V8 5.1 - 5.0 ABI compatibility

    Ref: #23
    
    PR-URL: nodejs#7016
    Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Matt Loring authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    2c46e23 View commit details
    Browse the repository at this point in the history
  12. deps: remove extra field from v8::HeapStatistics

    Remove the `_malloced_memory` field from the `HeapStatistics`
    class to achieve full ABI compatibility with V8 5.0.
    
    Ref: nodejs#7016
    PR-URL: nodejs#7526
    Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    addaleax authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    9a4b338 View commit details
    Browse the repository at this point in the history
  13. deps: cherry-pick d721121 from v8 upstream

    Original commit message:
    
        Quit creating array literal boilerplates from Crankshaft.
    
        It's such a corner case.
    
        BUG=
    
        Review URL: https://codereview.chromium.org/1865013002
    
        Cr-Commit-Position: refs/heads/master@{nodejs#35346}
    
    Fixes: nodejs#7454
    PR-URL: nodejs#7632
    Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
    bnoordhuis authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    fc442e0 View commit details
    Browse the repository at this point in the history
  14. deps: cherry-pick 1f53e42 from v8 upstream

    Original commit message:
    
        Handle symbols in FrameMirror#invocationText().
    
        Fix a TypeError when putting together the invocationText for a
        symbol method's stack frame.
    
        See nodejs#7536.
    
        Review-Url: https://codereview.chromium.org/2122793003
        Cr-Commit-Position: refs/heads/master@{nodejs#37597}
    
    Fixes: nodejs#7536
    PR-URL: nodejs#7612
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
    bnoordhuis authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    0ac21bc View commit details
    Browse the repository at this point in the history
  15. deps: cherry-pick 2b4c9c1 from v8 upstream

    Original commit message:
    
    S390:Update inline asm constraint in test-platform
    The GetStackPointer() routine in test-platform uses an inline
    assembly code to store the current stack pointer value into a static
    variable sp_addr.  The existing asm code for S390 uses an ST/STG
    instruction, with the memory operand associated with the general ('=g')
    constraint to sp_addr.
    
    On GCC 4.8.5, the GCC compiler got confused and treated sp_addr as
    an integer operand instead of memory operand, resulting in a store
    being emitted that writes to an invalid meory location.
    
    Given the specific store instructions being inlined here, we should
    restict the sp_addr operand to explicitly be a memory operand using '=m'
    instead of '=g'.
    
    R=bmeurer@chromium.org,jkummerow@chormium.org,rmcilroy@chromium.org,yangguo@chromium.org
    BUG=
    
    Review-Url: https://codereview.chromium.org/2158523002
    Cr-Commit-Position: refs/heads/master@{nodejs#37809}
    
    Fixes: nodejs#7659
    PR-URL: nodejs#7771
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
    joransiu authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    c4401d2 View commit details
    Browse the repository at this point in the history
  16. deps: cherry-pick b93c80a from v8 upstream

    Original commit message:
    
    If we can't rehash the backing store for weak sets & maps, do a last
    resort GC
    
    BUG=v8:4909
    R=hpayer@chromium.org
    
    Committed: https://crrev.com/b93c80a6039c757723e70420ae73375b5d277814
    Cr-Commit-Position: refs/heads/master@{#37591}
    
    Fixes: nodejs#6180
    PR-URL: nodejs#7689
    Reviewed-By: Matt Loring <mattloring@google.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Matt Loring authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    3b2f692 View commit details
    Browse the repository at this point in the history
  17. deps: cherry-pick a76d133 from v8 upstream

    Original commit message:
    
    Fix incorrect parameter to HasSufficientCapacity
    
    It takes the number of additional elements, not the total target
    capacity.
    
    Also, avoid right-shifting a negative integer as this is undefined in
    general
    
    BUG=v8:4909
    R=verwaest@chromium.org
    
    Review-Url: https://codereview.chromium.org/2162333002
    Cr-Commit-Position: refs/heads/master@{nodejs#37901}
    
    Fixes: nodejs#6180
    PR-URL: nodejs#7689
    Reviewed-By: Matt Loring <mattloring@google.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Matt Loring authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    4a20869 View commit details
    Browse the repository at this point in the history
  18. deps: cherry-pick a51f429 from V8 upstream

    Original commit message:
      [regexp] Fix case-insensitive matching for one-byte subjects.
    
      The bug occurs because we do not canonicalize character class ranges
      before adding case equivalents. While adding case equivalents, we abort
      early for one-byte subject strings, assuming that the ranges are sorted.
      Which they are not.
    
      R=marja@chromium.org
      BUG=v8:5199
    
      Review-Url: https://codereview.chromium.org/2159683002
      Cr-Commit-Position: refs/heads/master@{nodejs#37833}
    
    Fixes: nodejs#7708
    PR-URL: nodejs#7833
    Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
    fhinkel authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    b4f11ef View commit details
    Browse the repository at this point in the history
  19. deps: cherry-pick 6f68f30 from v8 upstream

    Original commit message:
    
    [build] Add force_dynamic_crt option to build a static library with /…
    …MD on windows
    
    Adds option to build a V8 library statically, but with the options on
    windows that allows it to be subsequently included in another DLL. On
    Windows this is required for it to correclty link against the correct
    C++ runtime. Require for our Node.js shared library build.
    
    Reference:  nodejs#7487
    
    BUG=
    R=machenbach@chromium.org, michael_dawson@ca.ibm.com
    
    Committed: https://crrev.com/9cf88c1c364cf76c1e745aa63196768435e8ef5d
    Review-Url: https://codereview.chromium.org/2149963002
    Cr-Original-Commit-Position: refs/heads/master@{nodejs#37814}
    Cr-Commit-Position: refs/heads/master@{nodejs#37856}
    
    PR-URL: nodejs#7802
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    stefanmb authored and ofrobots committed Aug 25, 2016
    2 Configuration menu
    Copy the full SHA
    cd77ca3 View commit details
    Browse the repository at this point in the history
  20. deps: V8: cherry-pick 588e15c, c0d4bb8

    Pick up an upstream bugfix for https://crbug.com/621926 and bump V8
    version to 5.1.281.80.
    
    Original commit message for 588e15c:
        Fixes a bug in cmpw.
    
        The opcodes for 'cmpw r/m16, r16' and 'cmpw r16, r/m16' were
        swapped, causing a few issues when less than/greater than
        comparison were performed.
    
        Adds a regression test.
    
        BUG=621926
    
        Committed: https://crrev.com/efa7095e3e360fbadbe909d831ac11b268ca26b0
        Review-Url: https://codereview.chromium.org/2103713003
        Cr-Original-Commit-Position: refs/heads/master@{nodejs#37339}
        Cr-Commit-Position: refs/heads/master@{nodejs#37345}
    
    Original commit message for c0d4bb8:
        Fixes a wrong use of Operand in a test.
    
        Operand(reg) -> reg
        Operand(reg, 0) -> [reg]
    
        BUG=
    
        Review-Url: https://codereview.chromium.org/2111503002
        Cr-Commit-Position: refs/heads/master@{nodejs#37370}
    
    PR-URL: nodejs#8038
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
    Reviewed-By: mhdawson - Michael Dawson <michael_dawson@ca.ibm.com>
    epertoso authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    fc2a89c View commit details
    Browse the repository at this point in the history
  21. deps: cherry-pick de5aaad from V8's upstream

    Original commit message:
    
        [Debugger] Fix StepNext over function with caught exception
    
        Without CL debugger on StepNext adds breakpoint to function where
        throw instruction is located. In case of StepNext we will skip pause
        in this function because StepNext shouldn't break in a deeper frame.
    
        BUG=chromium:604495
        R=yangguo@chromium.org
        LOG=N
    
        Review URL: https://codereview.chromium.org/1894263002
    
        Cr-Commit-Position: refs/heads/master@{nodejs#35627}
    
    Fixes: nodejs#7219
    PR-URL: nodejs#8099
    Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
    targos authored and ofrobots committed Aug 25, 2016
    Configuration menu
    Copy the full SHA
    723fa96 View commit details
    Browse the repository at this point in the history