Backed out 2 changesets (bug 1382377) under suspicion of causing asan devtools failures a=backout CLOSED TREE

Backed out changeset c23f8bd95172 (bug 1382377)
Backed out changeset e9156a9ede8e (bug 1382377)

MozReview-Commit-ID: GnLs0Kzd5em
This commit is contained in:
Wes Kocher 2017-08-30 16:44:20 -07:00
Родитель 8315f8dcc5
Коммит a216658ae3
8 изменённых файлов: 0 добавлений и 110 удалений

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

@ -399,9 +399,6 @@ DevToolsStartup.prototype = {
}
this.recorded = true;
}
if (!this.initialized) {
Services.prefs.setBoolPref("devtools.enabled", true);
}
this.initialized = true;
let { require } = Cu.import("resource://devtools/shared/Loader.jsm", {});
// Ensure loading main devtools module that hooks up into browser UI

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

@ -295,7 +295,6 @@ bool nsContentUtils::sIsUserTimingLoggingEnabled = false;
bool nsContentUtils::sIsFormAutofillAutocompleteEnabled = false;
bool nsContentUtils::sIsWebComponentsEnabled = false;
bool nsContentUtils::sIsCustomElementsEnabled = false;
bool nsContentUtils::sDevToolsEnabled = false;
bool nsContentUtils::sSendPerformanceTimingNotifications = false;
bool nsContentUtils::sUseActivityCursor = false;
bool nsContentUtils::sAnimationsAPICoreEnabled = false;
@ -705,9 +704,6 @@ nsContentUtils::Init()
Preferences::AddBoolVarCache(&sIsCustomElementsEnabled,
"dom.webcomponents.customelements.enabled", false);
Preferences::AddBoolVarCache(&sDevToolsEnabled,
"devtools.enabled");
Preferences::AddIntVarCache(&sPrivacyMaxInnerWidth,
"privacy.window.maxInnerWidth",
1000);
@ -10854,17 +10850,3 @@ nsContentUtils::ExtractErrorValues(JSContext* aCx,
}
}
/* static */ bool
nsContentUtils::DevToolsEnabled(JSContext* aCx)
{
if (NS_IsMainThread()) {
return sDevToolsEnabled;
}
workers::WorkerPrivate* workerPrivate = workers::GetWorkerPrivateFromContext(aCx);
if (!workerPrivate) {
return false;
}
return workerPrivate->DevToolsEnabled();
}

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

@ -1083,12 +1083,6 @@ public:
nsACString& aSourceSpecOut, uint32_t *aLineOut,
uint32_t *aColumnOut, nsString& aMessageOut);
/**
* Helper function to tell if user ever enabled DevTools explicitely.
* Allows making DevTools related API no-op until user do so.
*/
static bool DevToolsEnabled(JSContext* aCx);
/**
* Fill (with the parameters given) the localized string named |aKey| in
* properties file |aFile|.
@ -3275,7 +3269,6 @@ private:
static bool sIsFormAutofillAutocompleteEnabled;
static bool sIsWebComponentsEnabled;
static bool sIsCustomElementsEnabled;
static bool sDevToolsEnabled;
static bool sSendPerformanceTimingNotifications;
static bool sUseActivityCursor;
static bool sAnimationsAPICoreEnabled;

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

@ -1052,11 +1052,6 @@ void
Console::ProfileMethodInternal(JSContext* aCx, const nsAString& aAction,
const Sequence<JS::Value>& aData)
{
// Make all Console API no-op if DevTools aren't enabled.
if (!nsContentUtils::DevToolsEnabled(aCx)) {
return;
}
if (!NS_IsMainThread()) {
// Here we are in a worker thread.
RefPtr<ConsoleProfileRunnable> runnable =
@ -1205,10 +1200,6 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
const nsAString& aMethodString,
const Sequence<JS::Value>& aData)
{
// Make all Console API no-op if DevTools aren't enabled.
if (!nsContentUtils::DevToolsEnabled(aCx)) {
return;
}
AssertIsOnOwningThread();
RefPtr<ConsoleCallData> callData(new ConsoleCallData());

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

@ -9,4 +9,3 @@ support-files =
[test_consoleEmptyStack.html]
[test_console_binding.html]
[test_console_proto.html]
[test_devtools_pref.html]

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

@ -1,65 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test Console with devtools preference</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript">
function consoleListener(expected) {
var messages = [];
return new Promise(done => {
let observer = {
observe: function listener(aSubject, aTopic, aData) {
var obj = aSubject.wrappedJSObject;
messages.push(parseInt(obj.arguments[0]));
if (messages.length == expected) {
SpecialPowers.removeObserver(observer, "console-api-log-event");
SpecialPowers.removeObserver(observer, "console-api-profiler");
done(messages);
return;
}
}
};
SpecialPowers.addObserver(observer, "console-api-log-event");
SpecialPowers.addObserver(observer, "console-api-profiler");
});
}
SimpleTest.waitForExplicitFinish();
(async function () {
var onMessages = consoleListener(4);
await SpecialPowers.pushPrefEnv({set: [["devtools.enabled", false]]});
console.log(1);
console.profile(2);
await SpecialPowers.pushPrefEnv({set: [["devtools.enabled", true]]});
console.log(3);
console.profile(4);
await SpecialPowers.pushPrefEnv({set: [["devtools.enabled", false]]});
console.log(5);
console.profile(6);
await SpecialPowers.pushPrefEnv({set: [["devtools.enabled", true]]});
console.log(7);
console.profile(8);
var messages = await onMessages;
is(messages[0], 3, "Got only console message while pref was true");
is(messages[1], 4, "Got only profile message while pref was true");
is(messages[2], 7, "Got only console message while pref was true");
is(messages[3], 8, "Got only profile message while pref was true");
SimpleTest.finish();
})();
</script>
</body>
</html>

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

@ -46,7 +46,6 @@ WORKER_SIMPLE_PREF("dom.abortController.enabled", AbortControllerEnabled, ABORTC
WORKER_SIMPLE_PREF("dom.abortController.fetch.enabled", AbortControllerEnabledInFetch, ABORTCONTROLLER_FETCH_ENABLED)
WORKER_SIMPLE_PREF("dom.fetchObserver.enabled", FetchObserverEnabled, FETCHOBSERVER_ENABLED)
WORKER_SIMPLE_PREF("privacy.resistFingerprinting", ResistFingerprintingEnabled, RESISTFINGERPRINTING_ENABLED)
WORKER_SIMPLE_PREF("devtools.enabled", DevToolsEnabled, DEVTOOLS_ENABLED)
WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
WORKER_PREF("general.appname.override", AppNameOverrideChanged)
WORKER_PREF("general.appversion.override", AppVersionOverrideChanged)

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

@ -1029,12 +1029,6 @@ pref("toolkit.asyncshutdown.crash_timeout", 60000);
// Extra logging for AsyncShutdown barriers and phases
pref("toolkit.asyncshutdown.log", false);
// Tells if DevTools have been explicitely enabled by the user.
// This pref allows to disable all features related to DevTools
// for users that never use them.
// Until bug 1361080 lands, we always consider them enabled.
pref("devtools.enabled", true);
// Enable deprecation warnings.
pref("devtools.errorconsole.deprecation_warnings", true);