Skip to content

Commit

Permalink
Backed out 8 changesets (bug 1679440, bug 1682069, bug 1667276) for c…
Browse files Browse the repository at this point in the history
…ausing failure on test_crash_backgroundtask_moz_crash.js. CLOSED TREE

Backed out changeset f06504e3219f (bug 1682069)
Backed out changeset 4d325f68ea24 (bug 1679440)
Backed out changeset 9ab334e527a5 (bug 1667276)
Backed out changeset 1c8d51d2c90f (bug 1667276)
Backed out changeset 8d6f10d83c6b (bug 1667276)
Backed out changeset 62488ec634f9 (bug 1667276)
Backed out changeset 1dcb2d1be264 (bug 1667276)
Backed out changeset c673fff5bd85 (bug 1667276)
  • Loading branch information
Butkovits Atila committed Jan 27, 2021
1 parent 897cbb0 commit 89fe8f2
Show file tree
Hide file tree
Showing 40 changed files with 30 additions and 1,450 deletions.
3 changes: 0 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,3 @@ tools/tryselect/selectors/chooser/templates/chooser.html

# Ignore preprocessed *(P)refs.js files in update-packaging.
tools/update-packaging/**/*refs.js

# Ignore backgroundtasks preferences files.
toolkit/components/backgroundtasks/defaults
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,3 @@ devtools/client/debugger/src/test/mochitest/examples/ember/quickstart

# These are source mapped and the locations are asserted in the test case.
devtools/client/webconsole/test/browser/test-mangled-function.*

# Ignore backgroundtasks preferences files.
toolkit/components/backgroundtasks/defaults
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@ if (AppConstants.platform == "macosx") {
gExceptionPaths.push("resource://gre/res/touchbar/");
}

if (AppConstants.MOZ_BACKGROUNDTASKS) {
// These preferences are active only when we're in background task mode.
gExceptionPaths.push("resource://gre/defaults/backgroundtasks/");
// `BackgroundTask_id.jsm` is loaded at runtime by `app --backgroundtask id ...`.
gExceptionPaths.push("resource://gre/modules/backgroundtasks/");
}

// Each whitelist entry should have a comment indicating which file is
// referencing the whitelisted file in a way that the test can't detect, or a
// bug number to remove or use the file if it is indeed currently unreferenced.
Expand Down
4 changes: 0 additions & 4 deletions browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ ifdef MOZ_DEFAULT_BROWSER_AGENT
DEFINES += -DMOZ_DEFAULT_BROWSER_AGENT=1
endif

ifdef MOZ_BACKGROUNDTASKS
DEFINES += -DMOZ_BACKGROUNDTASKS=1
endif

ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
MOZ_PKG_MAC_DSSTORE=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/dsstore
MOZ_PKG_MAC_BACKGROUND=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/background.png
Expand Down
6 changes: 0 additions & 6 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,6 @@
; gre location for now.
@RESPATH@/defaults/pref/channel-prefs.js

; Background tasks-specific preferences. These are in the GRE
; location since they apply to all tasks at this time.
#ifdef MOZ_BACKGROUNDTASKS
@RESPATH@/defaults/backgroundtasks/backgroundtasks.js
#endif

; [Layout Engine Resources]
; Style Sheets, Graphics and other Resources used by the layout engine.
@RESPATH@/res/EditorOverride.css
Expand Down
7 changes: 1 addition & 6 deletions extensions/pref/autoconfig/src/components.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ Classes = [
'type': 'nsReadConfig',
'headers': ['/extensions/pref/autoconfig/src/nsReadConfig.h'],
'init_method': 'Init',
'categories': {
'pref-config-startup': {
'name': 'ReadConfig Module',
'backgroundtasks': BackgroundTasksSelector.ALL_TASKS,
},
},
'categories': {'pref-config-startup': 'ReadConfig Module'},
},
]
17 changes: 3 additions & 14 deletions layout/build/components.conf
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,7 @@ Classes = [
'cid': '{fc886801-e768-11d4-9885-00c04fa0cf4b}',
'contract_ids': ['@mozilla.org/content/document-loader-factory;1'],
'type': 'nsIDocumentLoaderFactory',
'categories': {
'Gecko-Content-Viewers': {
'name': content_types,
'backgroundtasks': BackgroundTasksSelector.ALL_TASKS,
}
},
'categories': {'Gecko-Content-Viewers': content_types},
},
{
'cid': '{0ddf4df8-4dbb-4133-8b79-9afb966514f5}',
Expand Down Expand Up @@ -294,14 +289,8 @@ Classes = [
'type': 'nsMixedContentBlocker',
'headers': ['mozilla/dom/nsMixedContentBlocker.h'],
'categories': {
'content-policy': {
'name': '@mozilla.org/mixedcontentblocker;1',
'backgroundtasks': BackgroundTasksSelector.ALL_TASKS,
},
'net-channel-event-sinks': {
'name': '@mozilla.org/mixedcontentblocker;1',
'backgroundtasks': BackgroundTasksSelector.ALL_TASKS,
},
'content-policy': '@mozilla.org/mixedcontentblocker;1',
'net-channel-event-sinks': '@mozilla.org/mixedcontentblocker;1',
},
},
{
Expand Down
29 changes: 0 additions & 29 deletions modules/libpref/Preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@
#include "plstr.h"
#include "prlink.h"
#include "xpcpublic.h"
#ifdef MOZ_BACKGROUNDTASKS
# include "mozilla/BackgroundTasks.h"
#endif

#ifdef DEBUG
# include <map>
Expand Down Expand Up @@ -4533,13 +4530,6 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) {
rv = pref_ReadDefaultPrefs(jarReader, "defaults/pref/*.js$");
NS_ENSURE_SUCCESS(rv, rv);

#ifdef MOZ_BACKGROUNDTASKS
if (BackgroundTasks::IsBackgroundTaskMode()) {
rv = pref_ReadDefaultPrefs(jarReader, "defaults/backgroundtasks/*.js$");
NS_ENSURE_SUCCESS(rv, rv);
}
#endif

#ifdef MOZ_WIDGET_ANDROID
// Load jar:$gre/omni.jar!/defaults/pref/$MOZ_ANDROID_CPU_ABI/*.js.
nsAutoCString path;
Expand Down Expand Up @@ -4619,25 +4609,6 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) {
NS_WARNING("Error parsing preferences.");
}
}

#ifdef MOZ_BACKGROUNDTASKS
if (BackgroundTasks::IsBackgroundTaskMode()) {
rv = appJarReader->FindInit("defaults/backgroundtasks/*.js$",
getter_Transfers(find));
NS_ENSURE_SUCCESS(rv, rv);
prefEntries.Clear();
while (NS_SUCCEEDED(find->FindNext(&entryName, &entryNameLen))) {
prefEntries.AppendElement(Substring(entryName, entryNameLen));
}
prefEntries.Sort();
for (uint32_t i = prefEntries.Length(); i--;) {
rv = pref_ReadPrefFromJar(appJarReader, prefEntries[i].get());
if (NS_FAILED(rv)) {
NS_WARNING("Error parsing preferences.");
}
}
}
#endif
}

nsCOMPtr<nsIProperties> dirSvc(
Expand Down
3 changes: 0 additions & 3 deletions modules/libpref/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,3 @@ else:
FINAL_TARGET_PP_FILES += [
"greprefs.js",
]

if CONFIG["MOZ_BACKGROUNDTASKS"]:
DEFINES["MOZ_BACKGROUNDTASKS"] = True
9 changes: 0 additions & 9 deletions startupcache/StartupCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
#include "GeckoProfiler.h"
#include "nsAppRunner.h"
#include "xpcpublic.h"
#ifdef MOZ_BACKGROUNDTASKS
# include "mozilla/BackgroundTasks.h"
#endif

#if defined(XP_WIN)
# include <windows.h>
Expand Down Expand Up @@ -118,12 +115,6 @@ StartupCache* StartupCache::GetSingletonNoInit() {
}

StartupCache* StartupCache::GetSingleton() {
#ifdef MOZ_BACKGROUNDTASKS
if (BackgroundTasks::IsBackgroundTaskMode()) {
return nullptr;
}
#endif

if (!gStartupCache) {
if (!XRE_IsParentProcess()) {
return nullptr;
Expand Down
3 changes: 0 additions & 3 deletions startupcache/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,4 @@ XPIDL_SOURCES += [
"nsIStartupCacheInfo.idl",
]

if CONFIG["MOZ_BACKGROUNDTASKS"]:
DEFINES["MOZ_BACKGROUNDTASKS"] = True

FINAL_LIBRARY = "xul"
12 changes: 0 additions & 12 deletions toolkit/components/backgroundtasks/BackgroundTask_exception.jsm

This file was deleted.

12 changes: 0 additions & 12 deletions toolkit/components/backgroundtasks/BackgroundTask_failure.jsm

This file was deleted.

12 changes: 0 additions & 12 deletions toolkit/components/backgroundtasks/BackgroundTask_success.jsm

This file was deleted.

11 changes: 1 addition & 10 deletions toolkit/components/backgroundtasks/BackgroundTasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@

#include "nsCOMPtr.h"
#include "nsIBackgroundTasks.h"
#include "nsIBackgroundTasksManager.h"
#include "nsICommandLine.h"
#include "nsIFile.h"
#include "nsISupports.h"
#include "nsImportModule.h"
#include "nsString.h"
#include "nsXULAppAPI.h"

Expand Down Expand Up @@ -113,14 +111,7 @@ class BackgroundTasks final : public nsIBackgroundTasks {
return NS_ERROR_NOT_AVAILABLE;
}

nsCOMPtr<nsIBackgroundTasksManager> manager =
do_ImportModule("resource://gre/modules/BackgroundTasksManager.jsm",
"BackgroundTasksManager");

NS_ENSURE_TRUE(manager, NS_ERROR_FAILURE);

NS_ConvertASCIItoUTF16 name(task.ref().get());
Unused << manager->RunBackgroundTaskNamed(name, aCmdLine);
// For now, do nothing.

return NS_OK;
}
Expand Down
134 changes: 0 additions & 134 deletions toolkit/components/backgroundtasks/BackgroundTasksManager.jsm

This file was deleted.

Loading

0 comments on commit 89fe8f2

Please sign in to comment.