mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1246828 - Part 4: Rename profile-before-change2 to profile-before-change-qm and profile-before-change3 to profile-before-change-telemetry; r=asuth
This commit is contained in:
parent
ba7d23556d
commit
2d1e6d62c8
@ -1316,8 +1316,8 @@ if (isGonk) {
|
||||
Services.obs.addObserver(function resetProfile(subject, topic, data) {
|
||||
Services.obs.removeObserver(resetProfile, topic);
|
||||
|
||||
// Listening for 'profile-before-change3' which is late in the shutdown
|
||||
// sequence, but still has xpcom access.
|
||||
// Listening for 'profile-before-change-telemetry' which is late in the
|
||||
// shutdown sequence, but still has xpcom access.
|
||||
Services.obs.addObserver(function clearProfile(subject, topic, data) {
|
||||
Services.obs.removeObserver(clearProfile, topic);
|
||||
if (isGonk) {
|
||||
@ -1357,7 +1357,7 @@ Services.obs.addObserver(function resetProfile(subject, topic, data) {
|
||||
}
|
||||
}
|
||||
},
|
||||
'profile-before-change3', false);
|
||||
'profile-before-change-telemetry', false);
|
||||
|
||||
let appStartup = Cc['@mozilla.org/toolkit/app-startup;1']
|
||||
.getService(Ci.nsIAppStartup);
|
||||
|
@ -128,8 +128,8 @@ PowerManagerService::SyncProfile()
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change2", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change3", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change-qm", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change-telemetry", context.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@
|
||||
#define PREF_TESTING_FEATURES "dom.quotaManager.testing"
|
||||
|
||||
// profile-before-change, when we need to shut down quota manager
|
||||
#define PROFILE_BEFORE_CHANGE2_OBSERVER_ID "profile-before-change2"
|
||||
#define PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID "profile-before-change-qm"
|
||||
|
||||
#define KB * 1024ULL
|
||||
#define MB * 1024ULL KB
|
||||
@ -2262,9 +2262,10 @@ CreateRunnable::RegisterObserver()
|
||||
|
||||
nsCOMPtr<nsIObserver> observer = new ShutdownObserver(mOwningThread);
|
||||
|
||||
nsresult rv = observerService->AddObserver(observer,
|
||||
PROFILE_BEFORE_CHANGE2_OBSERVER_ID,
|
||||
false);
|
||||
nsresult rv =
|
||||
observerService->AddObserver(observer,
|
||||
PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID,
|
||||
false);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
@ -2419,7 +2420,7 @@ ShutdownObserver::Observe(nsISupports* aSubject,
|
||||
const char16_t* aData)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(!strcmp(aTopic, PROFILE_BEFORE_CHANGE2_OBSERVER_ID));
|
||||
MOZ_ASSERT(!strcmp(aTopic, PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID));
|
||||
|
||||
bool done = false;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "QuotaManager.h"
|
||||
#include "QuotaRequests.h"
|
||||
|
||||
#define PROFILE_BEFORE_CHANGE2_OBSERVER_ID "profile-before-change2"
|
||||
#define PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID "profile-before-change-qm"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -294,9 +294,10 @@ QuotaManagerService::Init()
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult rv = observerService->AddObserver(this,
|
||||
PROFILE_BEFORE_CHANGE2_OBSERVER_ID,
|
||||
false);
|
||||
nsresult rv =
|
||||
observerService->AddObserver(this,
|
||||
PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID,
|
||||
false);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
@ -637,7 +638,7 @@ QuotaManagerService::Observe(nsISupports* aSubject,
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!strcmp(aTopic, PROFILE_BEFORE_CHANGE2_OBSERVER_ID)) {
|
||||
if (!strcmp(aTopic, PROFILE_BEFORE_CHANGE_QM_OBSERVER_ID)) {
|
||||
RemoveIdleObserver();
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -614,7 +614,7 @@ function _execute_test() {
|
||||
obs.notifyObservers(null, "profile-change-net-teardown", null);
|
||||
obs.notifyObservers(null, "profile-change-teardown", null);
|
||||
obs.notifyObservers(null, "profile-before-change", null);
|
||||
obs.notifyObservers(null, "profile-before-change2", null);
|
||||
obs.notifyObservers(null, "profile-before-change-qm", null);
|
||||
|
||||
_profileInitialized = false;
|
||||
}
|
||||
|
@ -1021,7 +1021,7 @@ if (!isContent) {
|
||||
this.AsyncShutdown.profileChangeTeardown = getPhase("profile-change-teardown");
|
||||
this.AsyncShutdown.profileBeforeChange = getPhase("profile-before-change");
|
||||
this.AsyncShutdown.placesClosingInternalConnection = getPhase("places-will-close-connection");
|
||||
this.AsyncShutdown.sendTelemetry = getPhase("profile-before-change3");
|
||||
this.AsyncShutdown.sendTelemetry = getPhase("profile-before-change-telemetry");
|
||||
}
|
||||
|
||||
// Notifications that fire in the parent and content process, but should
|
||||
|
@ -193,7 +193,7 @@ interface nsIAsyncShutdownService: nsISupports {
|
||||
readonly attribute nsIAsyncShutdownClient quitApplicationGranted;
|
||||
|
||||
/**
|
||||
* Barrier for notification profile-before-change3.
|
||||
* Barrier for notification profile-before-change-telemetry.
|
||||
*/
|
||||
readonly attribute nsIAsyncShutdownClient sendTelemetry;
|
||||
|
||||
|
@ -249,8 +249,8 @@ List of phases
|
||||
``AsyncShutdown.sendTelemetry``
|
||||
|
||||
The client capability for clients wishing to block asynchronously
|
||||
during observer notification "profile-before-change3". Once the
|
||||
barrier is resolved, Telemetry must stop its operations.
|
||||
during observer notification "profile-before-change-telemetry".
|
||||
Once the barrier is resolved, Telemetry must stop its operations.
|
||||
|
||||
``AsyncShutdown.webWorkersShutdown``
|
||||
|
||||
|
@ -1081,8 +1081,8 @@ nsXREDirProvider::DoShutdown()
|
||||
|
||||
// Phase 3: Notify observers of a profile change
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change", kShutdownPersist);
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change2", kShutdownPersist);
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change3", kShutdownPersist);
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change-qm", kShutdownPersist);
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change-telemetry", kShutdownPersist);
|
||||
}
|
||||
mProfileNotified = false;
|
||||
}
|
||||
|
@ -4746,8 +4746,8 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change2", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change3", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change-qm", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change-telemetry", context.get());
|
||||
// Then a controlled but very quick exit.
|
||||
_exit(0);
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ class ScopedXPCOM : public nsIDirectoryServiceProvider2
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-change-net-teardown", nullptr));
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-change-teardown", nullptr));
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-before-change", nullptr));
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-before-change2", nullptr));
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-before-change3", nullptr));
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-before-change-qm", nullptr));
|
||||
MOZ_ALWAYS_SUCCEEDS(os->NotifyObservers(nullptr, "profile-before-change-telemetry", nullptr));
|
||||
}
|
||||
|
||||
if (NS_FAILED(mProfD->Remove(true))) {
|
||||
|
Loading…
Reference in New Issue
Block a user