Bug 915735 - Part 1: Work around a bug in the MSVC PGO instrumented builds which prevents xpcshell to run successfully as a host tool during builds; r=sfink

--HG--
extra : rebase_source : e9b3bfc9cae14d0a699f584ccbda80157b065bc0
This commit is contained in:
Ehsan Akhgari 2013-09-23 15:28:08 -04:00
parent e0b4c7f3e6
commit ef1d626e26

View File

@ -715,12 +715,15 @@ class MOZ_STACK_CLASS Rooted : public js::RootedBase<T>
init(js::PerThreadDataFriendFields::getMainThread(rt));
}
~Rooted() {
// Note that we need to let the compiler generate the default destructor in
// non-exact-rooting builds because of a bug in the instrumented PGO builds
// using MSVC, see bug 915735 for more details.
#ifdef JSGC_TRACK_EXACT_ROOTS
~Rooted() {
JS_ASSERT(*stack == reinterpret_cast<Rooted<void*>*>(this));
*stack = prev;
#endif
}
#endif
#ifdef JSGC_TRACK_EXACT_ROOTS
Rooted<T> *previous() { return prev; }