зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1358160 - Get usage from subject instead of data field, r=Fischer
MozReview-Commit-ID: 5UNttoq1jiX --HG-- extra : rebase_source : b629cf3c33b54fe9a20ceb6e7d996d71917757fe
This commit is contained in:
Родитель
05789c2819
Коммит
a776ab68f5
|
@ -468,7 +468,7 @@ const gStoragePressureObserver = {
|
|||
Services.prefs.getIntPref("browser.storageManager.pressureNotification.usageThresholdGB");
|
||||
let msg = "";
|
||||
let buttons = [];
|
||||
let usage = parseInt(data);
|
||||
let usage = subject.QueryInterface(Ci.nsISupportsPRUint64).data
|
||||
let prefStrBundle = document.getElementById("bundle_preferences");
|
||||
let brandShortName = document.getElementById("bundle_brand").getString("brandShortName");
|
||||
let notificationBox = document.getElementById("high-priority-global-notificationbox");
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
|
||||
function notifyStoragePressure(usage = 100) {
|
||||
let notifyPromise = TestUtils.topicObserved("QuotaManager::StoragePressure", () => true);
|
||||
Services.obs.notifyObservers(null, "QuotaManager::StoragePressure", usage);
|
||||
let usageWrapper = Cc["@mozilla.org/supports-PRUint64;1"]
|
||||
.createInstance(Ci.nsISupportsPRUint64);
|
||||
usageWrapper.data = usage;
|
||||
Services.obs.notifyObservers(usageWrapper, "QuotaManager::StoragePressure");
|
||||
return notifyPromise;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче