Backed out changeset 99b6adafbfa3 (bug 1523609) for causing nsCOMPtr asertion failures and nsIAppStartup failures CLOSED TREE

This commit is contained in:
Ciure Andrei 2019-03-22 15:43:00 +02:00
Родитель e5b7cf51de
Коммит 8197ed228b
5 изменённых файлов: 5 добавлений и 24 удалений

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

@ -130,11 +130,7 @@ this.formautofill = class extends ExtensionAPI {
Services.mm.loadFrameScript("chrome://formautofill/content/FormAutofillFrameScript.js", true, true);
}
onShutdown(reason) {
if (reason == "APP_SHUTDOWN") {
return;
}
onShutdown() {
resProto.setSubstitution(RESOURCE_HOST, null);
this.chromeHandle.destruct();

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

@ -17,7 +17,7 @@ let l10nManifest;
this.l10n = class extends ExtensionAPI {
onShutdown(reason) {
if (reason !== "APP_SHUTDOWN" && l10nManifest) {
if (l10nManifest) {
Components.manager.removeBootstrappedManifestLocation(l10nManifest);
}
}

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

@ -28,7 +28,6 @@
#include "mozilla/Unused.h"
#include "mozilla/intl/LocaleService.h"
#include "nsIAppStartup.h"
#include "nsIObserverService.h"
#include "nsIPrefBranch.h"
#include "nsIPrefService.h"
@ -274,12 +273,6 @@ nsChromeRegistryChrome::Observe(nsISupports* aSubject, const char* aTopic,
NS_IMETHODIMP
nsChromeRegistryChrome::CheckForNewChrome() {
nsCOMPtr<nsIAppStartup> appStartup = components::AppStartup::Service();
if (appStartup->GetShuttingDown()) {
MOZ_ASSERT(false, "checking for new chrome during shutdown");
return NS_ERROR_UNEXPECTED;
}
mPackagesHash.Clear();
mOverrideTable.Clear();

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

@ -7,7 +7,8 @@
interface nsIToolkitProfile;
[scriptable, builtinclass, uuid(6621f6d5-6c04-4a0e-9e74-447db221484e)]
[scriptable, uuid(6621f6d5-6c04-4a0e-9e74-447db221484e)]
interface nsIAppStartup : nsISupports
{
/**
@ -141,7 +142,7 @@ interface nsIAppStartup : nsISupports
/**
* True if the application is in the process of shutting down.
*/
[infallible] readonly attribute boolean shuttingDown;
readonly attribute boolean shuttingDown;
/**
* True if the application is in the process of starting up.

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

@ -15,7 +15,6 @@
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/EndianUtils.h"
#include "mozilla/Components.h"
#include "mozilla/Compression.h"
#include "mozilla/LinkedList.h"
#include "mozilla/Preferences.h"
@ -31,7 +30,6 @@
#include "nsAppRunner.h"
#include "nsContentUtils.h"
#include "nsChromeRegistry.h"
#include "nsIAppStartup.h"
#include "nsIDOMWindowUtils.h" // for nsIJSRAIIHelper
#include "nsIFileURL.h"
#include "nsIIOService.h"
@ -694,13 +692,6 @@ RegistryEntries::Destruct() {
if (isInList()) {
remove();
// No point in doing I/O to check for new chrome during shutdown, return
// early in that case.
nsCOMPtr<nsIAppStartup> appStartup = components::AppStartup::Service();
if (appStartup->GetShuttingDown()) {
return NS_OK;
}
// When we remove dynamic entries from the registry, we need to rebuild it
// in order to ensure a consistent state. See comments in Observe().
RefPtr<nsChromeRegistry> cr = nsChromeRegistry::GetSingleton();