summaryrefslogtreecommitdiffstats
path: root/js/src/jsapi-tests
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsapi-tests')
-rw-r--r--js/src/jsapi-tests/testGCFinalizeCallback.cpp30
-rw-r--r--js/src/jsapi-tests/testGCHeapPostBarriers.cpp4
-rw-r--r--js/src/jsapi-tests/testGCMarking.cpp25
-rw-r--r--js/src/jsapi-tests/testGCUniqueId.cpp4
-rw-r--r--js/src/jsapi-tests/tests.h35
5 files changed, 0 insertions, 98 deletions
diff --git a/js/src/jsapi-tests/testGCFinalizeCallback.cpp b/js/src/jsapi-tests/testGCFinalizeCallback.cpp
index 48003ab0c..a8f7ba7f8 100644
--- a/js/src/jsapi-tests/testGCFinalizeCallback.cpp
+++ b/js/src/jsapi-tests/testGCFinalizeCallback.cpp
@@ -94,36 +94,6 @@ BEGIN_TEST(testGCFinalizeCallback)
CHECK(checkFinalizeStatus());
CHECK(checkFinalizeIsZoneGC(true));
-#ifdef JS_GC_ZEAL
-
- /* Full GC with reset due to new zone, becoming zone GC. */
-
- FinalizeCalls = 0;
- JS_SetGCZeal(cx, 9, 1000000);
- JS::PrepareForFullGC(cx);
- js::SliceBudget budget(js::WorkBudget(1));
- cx->gc.startDebugGC(GC_NORMAL, budget);
- CHECK(cx->gc.state() == js::gc::State::Mark);
- CHECK(cx->gc.isFullGc());
-
- JS::RootedObject global4(cx, createTestGlobal());
- budget = js::SliceBudget(js::WorkBudget(1));
- cx->gc.debugGCSlice(budget);
- while (cx->gc.isIncrementalGCInProgress())
- cx->gc.debugGCSlice(budget);
- CHECK(!cx->gc.isIncrementalGCInProgress());
- CHECK(!cx->gc.isFullGc());
- CHECK(checkMultipleGroups());
- CHECK(checkFinalizeStatus());
-
- for (unsigned i = 0; i < FinalizeCalls - 1; ++i)
- CHECK(!IsZoneGCBuffer[i]);
- CHECK(IsZoneGCBuffer[FinalizeCalls - 1]);
-
- JS_SetGCZeal(cx, 0, 0);
-
-#endif
-
/*
* Make some use of the globals here to ensure the compiler doesn't optimize
* them away in release builds, causing the zones to be collected and
diff --git a/js/src/jsapi-tests/testGCHeapPostBarriers.cpp b/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
index 74512a53f..00d47f111 100644
--- a/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
+++ b/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
@@ -40,10 +40,6 @@ JSFunction* CreateGCThing(JSContext* cx)
BEGIN_TEST(testGCHeapPostBarriers)
{
-#ifdef JS_GC_ZEAL
- AutoLeaveZeal nozeal(cx);
-#endif /* JS_GC_ZEAL */
-
/* Sanity check - objects start in the nursery and then become tenured. */
JS_GC(cx);
JS::RootedObject obj(cx, CreateGCThing<JSObject>(cx));
diff --git a/js/src/jsapi-tests/testGCMarking.cpp b/js/src/jsapi-tests/testGCMarking.cpp
index 684397392..b475c2d69 100644
--- a/js/src/jsapi-tests/testGCMarking.cpp
+++ b/js/src/jsapi-tests/testGCMarking.cpp
@@ -101,10 +101,6 @@ class CCWTestTracer : public JS::CallbackTracer {
BEGIN_TEST(testTracingIncomingCCWs)
{
-#ifdef JS_GC_ZEAL
- // Disable zeal modes because this test needs to control exactly when the GC happens.
- JS_SetGCZeal(cx, 0, 100);
-#endif
JS_GC(cx);
JS::RootedObject global1(cx, JS::CurrentGlobalOrNull(cx));
@@ -146,10 +142,6 @@ countWrappers(JSCompartment* comp)
BEGIN_TEST(testDeadNurseryCCW)
{
-#ifdef JS_GC_ZEAL
- // Disable zeal modes because this test needs to control exactly when the GC happens.
- JS_SetGCZeal(cx, 0, 100);
-#endif
JS_GC(cx);
JS::RootedObject global1(cx, JS::CurrentGlobalOrNull(cx));
@@ -177,10 +169,6 @@ END_TEST(testDeadNurseryCCW)
BEGIN_TEST(testLiveNurseryCCW)
{
-#ifdef JS_GC_ZEAL
- // Disable zeal modes because this test needs to control exactly when the GC happens.
- JS_SetGCZeal(cx, 0, 100);
-#endif
JS_GC(cx);
JS::RootedObject global1(cx, JS::CurrentGlobalOrNull(cx));
@@ -208,10 +196,6 @@ END_TEST(testLiveNurseryCCW)
BEGIN_TEST(testLiveNurseryWrapperCCW)
{
-#ifdef JS_GC_ZEAL
- // Disable zeal modes because this test needs to control exactly when the GC happens.
- JS_SetGCZeal(cx, 0, 100);
-#endif
JS_GC(cx);
JS::RootedObject global1(cx, JS::CurrentGlobalOrNull(cx));
@@ -244,10 +228,6 @@ END_TEST(testLiveNurseryWrapperCCW)
BEGIN_TEST(testLiveNurseryWrappeeCCW)
{
-#ifdef JS_GC_ZEAL
- // Disable zeal modes because this test needs to control exactly when the GC happens.
- JS_SetGCZeal(cx, 0, 100);
-#endif
JS_GC(cx);
JS::RootedObject global1(cx, JS::CurrentGlobalOrNull(cx));
@@ -280,11 +260,6 @@ BEGIN_TEST(testIncrementalRoots)
{
JSRuntime* rt = cx->runtime();
-#ifdef JS_GC_ZEAL
- // Disable zeal modes because this test needs to control exactly when the GC happens.
- JS_SetGCZeal(cx, 0, 100);
-#endif
-
// Construct a big object graph to mark. In JS, the resulting object graph
// is equivalent to:
//
diff --git a/js/src/jsapi-tests/testGCUniqueId.cpp b/js/src/jsapi-tests/testGCUniqueId.cpp
index 71d66b722..d03d51b04 100644
--- a/js/src/jsapi-tests/testGCUniqueId.cpp
+++ b/js/src/jsapi-tests/testGCUniqueId.cpp
@@ -23,10 +23,6 @@ MinimizeHeap(JSContext* cx)
BEGIN_TEST(testGCUID)
{
-#ifdef JS_GC_ZEAL
- AutoLeaveZeal nozeal(cx);
-#endif /* JS_GC_ZEAL */
-
uint64_t uid = 0;
uint64_t tmp = 0;
diff --git a/js/src/jsapi-tests/tests.h b/js/src/jsapi-tests/tests.h
index 9955621ef..7f7309c16 100644
--- a/js/src/jsapi-tests/tests.h
+++ b/js/src/jsapi-tests/tests.h
@@ -418,39 +418,4 @@ class TestJSPrincipals : public JSPrincipals
}
};
-#ifdef JS_GC_ZEAL
-/*
- * Temporarily disable the GC zeal setting. This is only useful in tests that
- * need very explicit GC behavior and should not be used elsewhere.
- */
-class AutoLeaveZeal
-{
- JSContext* cx_;
- uint32_t zealBits_;
- uint32_t frequency_;
-
- public:
- explicit AutoLeaveZeal(JSContext* cx) : cx_(cx) {
- uint32_t dummy;
- JS_GetGCZealBits(cx_, &zealBits_, &frequency_, &dummy);
- JS_SetGCZeal(cx_, 0, 0);
- JS::PrepareForFullGC(cx_);
- JS::GCForReason(cx_, GC_SHRINK, JS::gcreason::DEBUG_GC);
- }
- ~AutoLeaveZeal() {
- for (size_t i = 0; i < sizeof(zealBits_) * 8; i++) {
- if (zealBits_ & (1 << i))
- JS_SetGCZeal(cx_, i, frequency_);
- }
-
-#ifdef DEBUG
- uint32_t zealBitsAfter, frequencyAfter, dummy;
- JS_GetGCZealBits(cx_, &zealBitsAfter, &frequencyAfter, &dummy);
- MOZ_ASSERT(zealBitsAfter == zealBits_);
- MOZ_ASSERT(frequencyAfter == frequency_);
-#endif
- }
-};
-#endif /* JS_GC_ZEAL */
-
#endif /* jsapi_tests_tests_h */