File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -3530,7 +3530,11 @@ UpdateManager.prototype = {
35303530 }
35313531 },
35323532
3533- refreshUpdateStatus: function UM_refreshUpdateStatus (update) {
3533+ /* *
3534+ * See nsIUpdateService.idl
3535+ */
3536+ refreshUpdateStatus: function UM_refreshUpdateStatus (aUpdate) {
3537+ var update = this ._activeUpdate ? this ._activeUpdate : aUpdate;
35343538 var updateSucceeded = true ;
35353539 var status = readStatusFile (getUpdatesDir ());
35363540 var ary = status.split (" :" );
Original file line number Diff line number Diff line change @@ -1170,8 +1170,6 @@ nsUpdateProcessor::ProcessUpdate(nsIUpdate* aUpdate)
11701170 }
11711171#endif
11721172
1173- mUpdate = aUpdate;
1174-
11751173 MOZ_ASSERT (NS_IsMainThread(), " not main thread" );
11761174 return NS_NewThread(getter_AddRefs (mProcessWatcher ),
11771175 NS_NewRunnableMethod (this , &nsUpdateProcessor::StartStagedUpdate));
@@ -1215,7 +1213,6 @@ nsUpdateProcessor::ShutdownWatcherThread()
12151213 MOZ_ASSERT (NS_IsMainThread(), " not main thread" );
12161214 mProcessWatcher ->Shutdown ();
12171215 mProcessWatcher = nullptr ;
1218- mUpdate = nullptr ;
12191216}
12201217
12211218void
@@ -1233,8 +1230,12 @@ nsUpdateProcessor::UpdateDone()
12331230
12341231 nsCOMPtr<nsIUpdateManager> um =
12351232 do_GetService (" @mozilla.org/updates/update-manager;1" );
1236- if (um && mUpdate ) {
1237- um->RefreshUpdateStatus (mUpdate );
1233+ if (um) {
1234+ nsCOMPtr<nsIUpdate> update;
1235+ um->GetActiveUpdate (getter_AddRefs (update));
1236+ if (update) {
1237+ um->RefreshUpdateStatus (update);
1238+ }
12381239 }
12391240
12401241 ShutdownWatcherThread ();
Original file line number Diff line number Diff line change @@ -105,7 +105,6 @@ class nsUpdateProcessor MOZ_FINAL : public nsIUpdateProcessor
105105private:
106106 ProcessType mUpdaterPID ;
107107 nsCOMPtr<nsIThread> mProcessWatcher ;
108- nsCOMPtr<nsIUpdate> mUpdate ;
109108 StagedUpdateInfo mInfo ;
110109};
111110#endif
You can’t perform that action at this time.
0 commit comments