Backed out 4 changesets (bug 1521191) for causing leaks on multiple tests

Backed out changeset 138e162d2778 (bug 1521191)
Backed out changeset 3782d011cc9f (bug 1521191)
Backed out changeset 38d3da4804d7 (bug 1521191)
Backed out changeset d6ce4b187195 (bug 1521191)
This commit is contained in:
Dorel Luca 2019-01-26 03:23:40 +02:00
Родитель 65a2f849aa
Коммит e1e5c4c775
8 изменённых файлов: 1 добавлений и 122 удалений

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

@ -329,18 +329,6 @@ interface nsIXPCComponents_Utils : nsISupports
*/
void intentionallyLeak();
/*
* In a debug build, cause the XPCOM leak checker to report a negative leak.
* This is needed to test leak checking.
*/
void intentionallyLeakNegatively();
/*
* In a debug build, make XPCOM not print out a bloat log in this process.
* This is needed to test leak checking.
*/
void disableDumpStatistics();
[implicit_jscontext]
jsval getJSTestingFunctions();

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

@ -46,7 +46,6 @@
#include "nsCommandLine.h"
#include "nsCommandParams.h"
#include "nsPersistentProperties.h"
#include "nsTraceRefcnt.h"
#include "nsIDocumentEncoder.h"
using namespace mozilla;
@ -1758,26 +1757,6 @@ nsXPCComponents_Utils::IntentionallyLeak() {
#endif
}
NS_IMETHODIMP
nsXPCComponents_Utils::IntentionallyLeakNegatively() {
#ifdef DEBUG
MOZ_COUNT_DTOR(IntentionallyLeakedObject);
return NS_OK;
#else
return NS_ERROR_NOT_IMPLEMENTED;
#endif
}
NS_IMETHODIMP
nsXPCComponents_Utils::DisableDumpStatistics() {
#ifdef DEBUG
nsTraceRefcnt::DisableDumpStatistics();
return NS_OK;
#else
return NS_ERROR_NOT_IMPLEMENTED;
#endif
}
NS_IMETHODIMP
nsXPCComponents_Utils::GetJSTestingFunctions(JSContext* cx,
MutableHandleValue retval) {

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

@ -1,25 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1343659
-->
<head>
<meta charset="utf-8">
<title>Test Pass</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
SpecialPowers.Cu.intentionallyLeakNegatively();
ok(true, "Test is ok");
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1343659">Mozilla Bug 1343659</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>

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

@ -1,25 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1343659
-->
<head>
<meta charset="utf-8">
<title>Test Crash</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
SpecialPowers.Cu.disableDumpStatistics();
ok(true, "Test is ok");
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1343659">Mozilla Bug 1343659</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<pre id="test">
</pre>
</body>
</html>

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

@ -127,25 +127,5 @@ def test_output_leak(runtests):
assert found_leaks, "At least one process should have leaked"
@pytest.mark.skip_mozinfo("!debug")
def test_output_no_leak_log(runtests):
status, lines = runtests('test_no_leak_log.html')
assert status == 0
tbpl_status, log_level, summary = get_mozharness_status(lines, status)
assert tbpl_status == TBPL_WARNING
assert log_level == WARNING
@pytest.mark.skip_mozinfo("!debug")
def test_output_negative_leaks(runtests):
status, lines = runtests('test_negative_leaks.html')
assert status == 0
tbpl_status, log_level, summary = get_mozharness_status(lines, status)
assert tbpl_status == TBPL_FAILURE
assert log_level == ERROR
if __name__ == '__main__':
mozunit.main()

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

@ -68,12 +68,7 @@ class StatusHandler(object):
self.unexpected_statuses["FAIL"] += 1
if action == "mozleak_total":
data_bytes = data["bytes"]
if data_bytes is None:
if not (data.get("induced_crash", False) or
data.get("ignore_missing", False)):
self.unexpected_statuses["FAIL"] += 1
elif data_bytes > data.get("threshold", 0):
if data.get("bytes", 0) > data.get("threshold", 0):
self.unexpected_statuses["FAIL"] += 1
def summarize(self):

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

@ -117,7 +117,6 @@ static unsigned gActivityTLS = BAD_TLS_INDEX;
static bool gInitialized;
static nsrefcnt gInitCount;
static bool gDisableDumpStatistics = false;
static FILE* gBloatLog = nullptr;
static FILE* gRefcntsLog = nullptr;
@ -400,10 +399,6 @@ nsresult nsTraceRefcnt::DumpStatistics() {
"bogus positive or negative leaks being reported");
gDumpedStatistics = true;
if (gDisableDumpStatistics) {
return NS_OK;
}
// Don't try to log while we hold the lock, we'd deadlock.
AutoRestore<LoggingType> saveLogging(gLogging);
gLogging = NoLogging;
@ -1168,5 +1163,3 @@ void nsTraceRefcnt::SetActivityIsLegal(bool aLegal) {
PR_SetThreadPrivate(gActivityTLS, reinterpret_cast<void*>(!aLegal));
}
void nsTraceRefcnt::DisableDumpStatistics() { gDisableDumpStatistics = true; }

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

@ -25,12 +25,6 @@ class nsTraceRefcnt {
* activity that occurs because of static constructors or destructors.
*/
static void SetActivityIsLegal(bool aLegal);
/**
* Disable bloat log output at shutdown. This is used to test that the
* test harness handles a missing log properly.
*/
static void DisableDumpStatistics();
};
#endif // nsTraceRefcnt_h