Bug 1629313 - Part 2 - Avoid setting the desktop background twice for each request on Mac r=smaug
Update the check in the OnStateChange() so that we only attempt to set the background image once. Differential Revision: https://phabricator.services.mozilla.com/D71427
This commit is contained in:
@@ -201,7 +201,8 @@ NS_IMETHODIMP
|
||||
nsMacShellService::OnStateChange(nsIWebProgress* aWebProgress,
|
||||
nsIRequest* aRequest, uint32_t aStateFlags,
|
||||
nsresult aStatus) {
|
||||
if (aStateFlags & STATE_STOP) {
|
||||
if (NS_SUCCEEDED(aStatus) && (aStateFlags & STATE_STOP) &&
|
||||
(aRequest == nullptr)) {
|
||||
nsCOMPtr<nsIObserverService> os(
|
||||
do_GetService("@mozilla.org/observer-service;1"));
|
||||
if (os)
|
||||
|
||||
Reference in New Issue
Block a user