summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-03-06 22:59:56 +0100
committerFedor Indutny <fedor.indutny@gmail.com>2014-03-07 03:29:00 +0400
commit6bd78fd7704a8a695fc76430b573bc482f42c320 (patch)
tree4718d962cddf2cd88abbd9aeccb0797ed758ad88
parent5e06ce4fb949ab9bd5a7105dc0e8d924fd911d0c (diff)
downloadnode-6bd78fd7704a8a695fc76430b573bc482f42c320.tar.gz
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.)
-rw-r--r--deps/v8/src/global-handles.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/v8/src/global-handles.cc b/deps/v8/src/global-handles.cc
index c09ba4b47..faff357f9 100644
--- a/deps/v8/src/global-handles.cc
+++ b/deps/v8/src/global-handles.cc
@@ -610,7 +610,7 @@ void GlobalHandles::IterateAllRoots(ObjectVisitor* v) {
void GlobalHandles::IterateAllRootsWithClassIds(ObjectVisitor* v) {
for (NodeIterator it(this); !it.done(); it.Advance()) {
- if (it.node()->has_wrapper_class_id() && it.node()->IsRetainer()) {
+ if (it.node()->IsRetainer() && it.node()->has_wrapper_class_id()) {
v->VisitEmbedderReference(it.node()->location(),
it.node()->wrapper_class_id());
}