зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1044443 - release off main thread crash in nsXPCWrappedJS::Release() via nsUpdateProcessor::~nsUpdateProcessor(). r=bbondy
This commit is contained in:
Родитель
6bf8ed2521
Коммит
ba1ede8629
|
@ -3530,7 +3530,11 @@ UpdateManager.prototype = {
|
|||
}
|
||||
},
|
||||
|
||||
refreshUpdateStatus: function UM_refreshUpdateStatus(update) {
|
||||
/**
|
||||
* See nsIUpdateService.idl
|
||||
*/
|
||||
refreshUpdateStatus: function UM_refreshUpdateStatus(aUpdate) {
|
||||
var update = this._activeUpdate ? this._activeUpdate : aUpdate;
|
||||
var updateSucceeded = true;
|
||||
var status = readStatusFile(getUpdatesDir());
|
||||
var ary = status.split(":");
|
||||
|
|
|
@ -1170,8 +1170,6 @@ nsUpdateProcessor::ProcessUpdate(nsIUpdate* aUpdate)
|
|||
}
|
||||
#endif
|
||||
|
||||
mUpdate = aUpdate;
|
||||
|
||||
MOZ_ASSERT(NS_IsMainThread(), "not main thread");
|
||||
return NS_NewThread(getter_AddRefs(mProcessWatcher),
|
||||
NS_NewRunnableMethod(this, &nsUpdateProcessor::StartStagedUpdate));
|
||||
|
@ -1215,7 +1213,6 @@ nsUpdateProcessor::ShutdownWatcherThread()
|
|||
MOZ_ASSERT(NS_IsMainThread(), "not main thread");
|
||||
mProcessWatcher->Shutdown();
|
||||
mProcessWatcher = nullptr;
|
||||
mUpdate = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1233,8 +1230,12 @@ nsUpdateProcessor::UpdateDone()
|
|||
|
||||
nsCOMPtr<nsIUpdateManager> um =
|
||||
do_GetService("@mozilla.org/updates/update-manager;1");
|
||||
if (um && mUpdate) {
|
||||
um->RefreshUpdateStatus(mUpdate);
|
||||
if (um) {
|
||||
nsCOMPtr<nsIUpdate> update;
|
||||
um->GetActiveUpdate(getter_AddRefs(update));
|
||||
if (update) {
|
||||
um->RefreshUpdateStatus(update);
|
||||
}
|
||||
}
|
||||
|
||||
ShutdownWatcherThread();
|
||||
|
|
|
@ -105,7 +105,6 @@ private:
|
|||
private:
|
||||
ProcessType mUpdaterPID;
|
||||
nsCOMPtr<nsIThread> mProcessWatcher;
|
||||
nsCOMPtr<nsIUpdate> mUpdate;
|
||||
StagedUpdateInfo mInfo;
|
||||
};
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче