mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-10 02:29:43 +00:00
#578: M1322864 M1585106 M1597043
This commit is contained in:
parent
3f21b5a05c
commit
7758ebb12e
|
@ -366,6 +366,15 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
||||||
if (FocusMgr()->HasDOMFocus(targetNode)) {
|
if (FocusMgr()->HasDOMFocus(targetNode)) {
|
||||||
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSel =
|
nsCOMPtr<nsIDOMXULMultiSelectControlElement> multiSel =
|
||||||
do_QueryInterface(targetNode);
|
do_QueryInterface(targetNode);
|
||||||
|
if (!multiSel) {
|
||||||
|
// This shouldn't be possible. All XUL trees should have
|
||||||
|
// nsIDOMXULMultiSelectControlElement, and the tree is focused, so it
|
||||||
|
// shouldn't be dying. Nevertheless, this sometimes happens in the wild
|
||||||
|
// (bug 1597043).
|
||||||
|
MOZ_ASSERT_UNREACHABLE(
|
||||||
|
"XUL tree doesn't have nsIDOMXULMultiSelectControlElement");
|
||||||
|
return;
|
||||||
|
}
|
||||||
nsAutoString selType;
|
nsAutoString selType;
|
||||||
multiSel->GetSelType(selType);
|
multiSel->GetSelType(selType);
|
||||||
if (selType.IsEmpty() || !selType.EqualsLiteral("single")) {
|
if (selType.IsEmpty() || !selType.EqualsLiteral("single")) {
|
||||||
|
|
|
@ -3184,7 +3184,14 @@ nsContentUtils::GetImageFromContent(nsIImageLoadingContent* aContent,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (aRequest) {
|
if (aRequest) {
|
||||||
imgRequest.swap(*aRequest);
|
// If the consumer wants the request, verify it has actually loaded
|
||||||
|
// successfully.
|
||||||
|
uint32_t imgStatus;
|
||||||
|
imgRequest->GetImageStatus(&imgStatus);
|
||||||
|
if (imgStatus & imgIRequest::STATUS_FRAME_COMPLETE &&
|
||||||
|
!(imgStatus & imgIRequest::STATUS_ERROR)) {
|
||||||
|
imgRequest.swap(*aRequest);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return imgContainer.forget();
|
return imgContainer.forget();
|
||||||
|
|
|
@ -265,7 +265,8 @@ public:
|
||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
|
|
||||||
PACResolver()
|
PACResolver()
|
||||||
: mStatus(NS_ERROR_FAILURE)
|
: mStatus(NS_ERROR_FAILURE),
|
||||||
|
mMutex("PACResolver::Mutex")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,12 +275,17 @@ public:
|
||||||
nsIDNSRecord *record,
|
nsIDNSRecord *record,
|
||||||
nsresult status) override
|
nsresult status) override
|
||||||
{
|
{
|
||||||
if (mTimer) {
|
nsCOMPtr<nsITimer> timer;
|
||||||
mTimer->Cancel();
|
{
|
||||||
mTimer = nullptr;
|
MutexAutoLock lock(mMutex);
|
||||||
|
timer.swap(mTimer);
|
||||||
|
mRequest = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (timer) {
|
||||||
|
timer->Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
mRequest = nullptr;
|
|
||||||
mStatus = status;
|
mStatus = status;
|
||||||
mResponse = record;
|
mResponse = record;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -298,6 +304,7 @@ public:
|
||||||
nsCOMPtr<nsICancelable> mRequest;
|
nsCOMPtr<nsICancelable> mRequest;
|
||||||
nsCOMPtr<nsIDNSRecord> mResponse;
|
nsCOMPtr<nsIDNSRecord> mResponse;
|
||||||
nsCOMPtr<nsITimer> mTimer;
|
nsCOMPtr<nsITimer> mTimer;
|
||||||
|
Mutex mMutex;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~PACResolver() {}
|
~PACResolver() {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user