mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-15 13:09:14 +00:00
Bug 676110 - Part 3b: Remove double enqueuing from PlacesEvent. r=mak
--HG-- extra : rebase_source : cfd6970c8de81b2cdd81329084ca79516d02104e
This commit is contained in:
parent
3e9348d717
commit
c5114c7599
@ -377,14 +377,6 @@ GetHiddenState(bool aIsRedirect,
|
||||
|
||||
PlacesEvent::PlacesEvent(const char* aTopic)
|
||||
: mTopic(aTopic)
|
||||
, mDoubleEnqueue(false)
|
||||
{
|
||||
}
|
||||
|
||||
PlacesEvent::PlacesEvent(const char* aTopic,
|
||||
bool aDoubleEnqueue)
|
||||
: mTopic(aTopic)
|
||||
, mDoubleEnqueue(aDoubleEnqueue)
|
||||
{
|
||||
}
|
||||
|
||||
@ -405,16 +397,10 @@ PlacesEvent::Complete()
|
||||
void
|
||||
PlacesEvent::Notify()
|
||||
{
|
||||
if (mDoubleEnqueue) {
|
||||
mDoubleEnqueue = false;
|
||||
(void)NS_DispatchToMainThread(this);
|
||||
}
|
||||
else {
|
||||
NS_ASSERTION(NS_IsMainThread(), "Must only be used on the main thread!");
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (obs) {
|
||||
(void)obs->NotifyObservers(nsnull, mTopic, nsnull);
|
||||
}
|
||||
NS_ASSERTION(NS_IsMainThread(), "Must only be used on the main thread!");
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (obs) {
|
||||
(void)obs->NotifyObservers(nsnull, mTopic, nsnull);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -298,12 +298,10 @@ public:
|
||||
NS_DECL_MOZISTORAGECOMPLETIONCALLBACK
|
||||
|
||||
PlacesEvent(const char* aTopic);
|
||||
PlacesEvent(const char* aTopic, bool aDoubleEnqueue);
|
||||
protected:
|
||||
void Notify();
|
||||
|
||||
const char* const mTopic;
|
||||
bool mDoubleEnqueue;
|
||||
};
|
||||
|
||||
} // namespace places
|
||||
|
Loading…
x
Reference in New Issue
Block a user