deps: fix v8 valgrind warning
authorBen Noordhuis <info@bnoordhuis.nl>
Thu, 6 Mar 2014 21:59:56 +0000 (22:59 +0100)
committerFedor Indutny <fedor.indutny@gmail.com>
Thu, 6 Mar 2014 23:29:00 +0000 (03:29 +0400)
commit6bd78fd7704a8a695fc76430b573bc482f42c320
tree4718d962cddf2cd88abbd9aeccb0797ed758ad88
parent5e06ce4fb949ab9bd5a7105dc0e8d924fd911d0c
deps: fix v8 valgrind warning

Fix the following valgrind warning:

    Conditional jump or move depends on uninitialised value(s)
        at 0x7D64E7: v8::internal::GlobalHandles::IterateAllRootsWithClassIds(v8::internal::ObjectVisitor*) (global-handles.cc:613)
        by 0x94DCDC: v8::internal::NativeObjectsExplorer::FillRetainedObjects() (profile-generator.cc:2849)
        # etc.

This was fixed upstream in r12903 and released in 3.15.2 but that commit
was never back-ported to the 3.14 branch that node.js v0.10 uses.

The code itself works okay; this commit simply shuffles the clauses in
an `if` statement to check that the node is in use before checking its
class id (which is uninitialized if the node is not in use.)
deps/v8/src/global-handles.cc