Bug 852912 - Don't crash on NULL with AutoArrayRooter (r=bhackett)

--HG--
extra : rebase_source : f044831b03435b906221256611d7c01250b18ebe
This commit is contained in:
Bill McCloskey 2013-03-21 13:56:44 -07:00
parent 5ccbc1e0b0
commit 738da892c8
2 changed files with 2 additions and 3 deletions

View File

@ -628,8 +628,8 @@ AutoGCRooter::trace(JSTracer *trc)
}
JS_ASSERT(tag_ >= 0);
MarkValueRootRange(trc, tag_, static_cast<AutoArrayRooter *>(this)->array,
"JS::AutoArrayRooter.array");
if (Value *vp = static_cast<AutoArrayRooter *>(this)->array)
MarkValueRootRange(trc, tag_, vp, "JS::AutoArrayRooter.array");
}
/* static */ void

View File

@ -1,4 +1,3 @@
// |reftest| skip-if(xulRuntime.OS=="WINNT"&&isDebugBuild)
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/