Don't run the compositor:created notification from within unsafer callers. (bug 1201684, r=mattwoodrow)

This commit is contained in:
David Anderson 2015-09-13 23:51:45 -07:00
parent a08f4cd648
commit c06300e224

View File

@ -2484,9 +2484,11 @@ gfxPlatform::NotifyCompositorCreated(LayersBackend aBackend)
mCompositorBackend = aBackend;
// Notify that we created a compositor, so telemetry can update.
NS_DispatchToMainThread(NS_NewRunnableFunction([] {
if (nsCOMPtr<nsIObserverService> obsvc = services::GetObserverService()) {
obsvc->NotifyObservers(nullptr, "compositor:created", nullptr);
}
}));
}
void