Backed out 3 changesets (bug 1165966) for WinXP jit-test permatimeouts.

Backed out changeset b0e3b5db76dc (bug 1165966)
Backed out changeset 73f1d1a18c24 (bug 1165966)
Backed out changeset 06899ee5f676 (bug 1165966)

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2015-05-20 16:34:07 -04:00
Родитель c2339f6da3
Коммит 9e51ec3c30
10 изменённых файлов: 9 добавлений и 130 удалений

Просмотреть файл

@ -50,13 +50,6 @@ js::CurrentThreadIsGCSweeping()
return js::TlsPerThreadData.get()->gcSweeping;
}
bool
js::CurrentThreadIsHandlingInitFailure()
{
JSRuntime* rt = js::TlsPerThreadData.get()->runtimeIfOnOwnerThread();
return rt && rt->handlingInitFailure;
}
#endif // DEBUG
template <typename S>

Просмотреть файл

@ -212,9 +212,6 @@ CurrentThreadIsIonCompiling();
bool
CurrentThreadIsGCSweeping();
bool
CurrentThreadIsHandlingInitFailure();
#endif
namespace gc {
@ -442,9 +439,8 @@ class HeapPtr : public BarrieredBase<T>
explicit HeapPtr(const HeapPtr<T>& v) : BarrieredBase<T>(v) { post(); }
#ifdef DEBUG
~HeapPtr() {
// No prebarrier necessary as this only happens when we are sweeping or
// before the containing obect becomes part of the GC graph.
MOZ_ASSERT(CurrentThreadIsGCSweeping() || CurrentThreadIsHandlingInitFailure());
// No prebarrier necessary as this only happens when we are sweeping.
MOZ_ASSERT(CurrentThreadIsGCSweeping());
}
#endif

Просмотреть файл

@ -1,10 +0,0 @@
// |jit-test| --fuzzing-safe; --thread-count=2; --no-ggc; allow-unhandlable-oom; allow-oom
if (!("oomAfterAllocations" in this))
quit();
var g = newGlobal("ar-u-nu-arab", this);
function attach(g, i) {
var dbg = Debugger(g);
oomAfterAllocations(10);
}
for (var i = 0; i < 3; i++)
attach(g, i);

Просмотреть файл

@ -1,24 +0,0 @@
// |jit-test| --fuzzing-safe; --thread-count=2; --no-ggc; allow-unhandlable-oom; allow-oom
if (!("oomAfterAllocations" in this))
quit();
var lfcode = new Array();
lfcode.push(`
var g = newGlobal();
var N = 4;
for (var i = 0; i < N; i++) {
var dbg = Debugger(g);
oomAfterAllocations(10);
}
`);
options = function() {}
var lfRunTypeId = -1;
var file = lfcode.shift();
loadFile(file)
function loadFile(lfVarx) {
if (lfVarx.substr(-7) != ".js" && lfVarx.length != 2) unescape("x");
try {
if (lfVarx.substr(-3) != ".js" && lfVarx.length != 1) {
evaluate(lfVarx);
}
} catch (lfVare) {}
}

Просмотреть файл

@ -2030,22 +2030,18 @@ BacktrackingAllocator::populateSafepoints()
safepoint->addGcPointer(a);
break;
case LDefinition::SLOTS:
if (!safepoint->addSlotsOrElementsPointer(a))
return false;
safepoint->addSlotsOrElementsPointer(a);
break;
#ifdef JS_NUNBOX32
case LDefinition::TYPE:
if (!safepoint->addNunboxType(i, a))
return false;
safepoint->addNunboxType(i, a);
break;
case LDefinition::PAYLOAD:
if (!safepoint->addNunboxPayload(i, a))
return false;
safepoint->addNunboxPayload(i, a);
break;
#else
case LDefinition::BOX:
if (!safepoint->addBoxedValue(a))
return false;
safepoint->addBoxedValue(a);
break;
#endif
default:

Просмотреть файл

@ -39,10 +39,7 @@ WeakMapBase::WeakMapBase(JSObject* memOf, JSCompartment* c)
WeakMapBase::~WeakMapBase()
{
MOZ_ASSERT(CurrentThreadIsGCSweeping() || CurrentThreadIsHandlingInitFailure());
MOZ_ASSERT_IF(CurrentThreadIsGCSweeping(), !isInList());
if (isInList())
removeWeakMapFromList(this);
MOZ_ASSERT(!isInList());
}
void

Просмотреть файл

@ -92,7 +92,7 @@ class WeakMapBase {
virtual void finish() = 0;
// Object that this weak map is part of, if any.
HeapPtrObject memberOf;
RelocatablePtrObject memberOf;
// Compartment that this weak map is part of.
JSCompartment* compartment;

Просмотреть файл

@ -3109,7 +3109,7 @@ Debugger::construct(JSContext* cx, unsigned argc, Value* vp)
Debugger* debugger;
{
/* Construct the underlying C++ object. */
AutoInitGCManagedObject<Debugger> dbg(cx->make_unique<Debugger>(cx, obj.get()));
auto dbg = cx->make_unique<Debugger>(cx, obj.get());
if (!dbg || !dbg->init(cx))
return false;

Просмотреть файл

@ -172,7 +172,6 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime)
profilingScripts(false),
suppressProfilerSampling(false),
hadOutOfMemory(false),
handlingInitFailure(false),
haveCreatedContext(false),
allowRelazificationForTesting(false),
data(nullptr),

Просмотреть файл

@ -1077,9 +1077,6 @@ struct JSRuntime : public JS::shadow::Runtime,
/* Had an out-of-memory error which did not populate an exception. */
bool hadOutOfMemory;
/* We are curently deleting an object due to an initialization failure. */
mozilla::DebugOnly<bool> handlingInitFailure;
/* A context has been created on this runtime. */
bool haveCreatedContext;
@ -1929,71 +1926,6 @@ class AutoEnterIonCompilation
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
/*
* AutoInitGCManagedObject is a wrapper for use when initializing a object whose
* lifetime is managed by the GC. It ensures that the object is destroyed if
* initialization fails but also allows us to assert the invariant that such
* objects are only destroyed in this way or by the GC.
*
* It has a limited interface but is a drop-in replacement for UniquePtr<T> is
* this situation. For example:
*
* AutoInitGCManagedObject<MyClass> ptr(cx->make_unique<MyClass>());
* if (!ptr) {
* ReportOutOfMemory(cx);
* return nullptr;
* }
*
* if (!ptr->init(cx))
* return nullptr; // Object destroyed here if init() failed.
*
* object->setPrivate(ptr.release());
* // Initialization successful, ptr is now owned through another object.
*/
template <typename T>
class MOZ_STACK_CLASS AutoInitGCManagedObject
{
typedef mozilla::UniquePtr<T, JS::DeletePolicy<T>> UniquePtrT;
UniquePtrT ptr_;
public:
explicit AutoInitGCManagedObject(UniquePtrT&& ptr)
: ptr_(mozilla::Move(ptr))
{}
~AutoInitGCManagedObject() {
#ifdef DEBUG
if (ptr_) {
JSRuntime* rt = TlsPerThreadData.get()->runtimeFromMainThread();
MOZ_ASSERT(!rt->handlingInitFailure);
rt->handlingInitFailure = true;
ptr_.reset(nullptr);
rt->handlingInitFailure = false;
}
#endif
}
T& operator*() const {
return *ptr_.get();
}
T* operator->() const {
return ptr_.get();
}
explicit operator bool() const {
return ptr_.get() != nullptr;
}
T* release() {
return ptr_.release();
}
AutoInitGCManagedObject(const AutoInitGCManagedObject<T>& other) = delete;
AutoInitGCManagedObject& operator=(const AutoInitGCManagedObject<T>& other) = delete;
};
} /* namespace js */
#ifdef _MSC_VER