mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
c5bb92f0c2
- Bug 1164714 - Flatten security/manager/ssl/public/ directory. r=keeler (a8bc114b3)
- Bug 1164714 - Flatten security/manager/ssl/src/ directory. r=keeler (9d7ba2f18)
- Bug 958421 - XUL dialog for certificate is security/manager/pki/resouces is unnecessary on Firefox Android. r=snorp (8b53b4b0a)
- fix mispatch of Bug 1101331: Modify directory structure of B2G.app (329bc5884)
- Bug 1164714 - Move and flatten security/manager/boot/{public,src}/ into security/manager/ssl/. r=keeler (3e293453b)
- Bug 1164714 - Fix unified compilation bustage on Windows. r=me (6d9ce3124)
48 lines
929 B
C++
48 lines
929 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "PSMRunnable.h"
|
|
|
|
namespace mozilla { namespace psm {
|
|
|
|
SyncRunnableBase::SyncRunnableBase()
|
|
: monitor("SyncRunnableBase::monitor")
|
|
{
|
|
}
|
|
|
|
nsresult
|
|
SyncRunnableBase::DispatchToMainThreadAndWait()
|
|
{
|
|
nsresult rv;
|
|
if (NS_IsMainThread()) {
|
|
RunOnTargetThread();
|
|
rv = NS_OK;
|
|
} else {
|
|
mozilla::MonitorAutoLock lock(monitor);
|
|
rv = NS_DispatchToMainThread(this);
|
|
if (NS_SUCCEEDED(rv)) {
|
|
lock.Wait();
|
|
}
|
|
}
|
|
|
|
return rv;
|
|
}
|
|
|
|
NS_IMETHODIMP
|
|
SyncRunnableBase::Run()
|
|
{
|
|
RunOnTargetThread();
|
|
mozilla::MonitorAutoLock(monitor).Notify();
|
|
return NS_OK;
|
|
}
|
|
|
|
nsresult
|
|
NotifyObserverRunnable::Run()
|
|
{
|
|
mObserver->Observe(nullptr, mTopic, nullptr);
|
|
return NS_OK;
|
|
}
|
|
|
|
} } // namespace mozilla::psm
|