mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-10 02:29:43 +00:00
#600: M1588248 M1614704
This commit is contained in:
parent
5bb1c76487
commit
03e03bd13c
|
@ -1861,6 +1861,8 @@ XMLHttpRequest::SendInternal(SendRunnable* aRunnable,
|
||||||
aRunnable->SetSyncLoopTarget(syncLoopTarget);
|
aRunnable->SetSyncLoopTarget(syncLoopTarget);
|
||||||
aRunnable->SetHaveUploadListeners(hasUploadListeners);
|
aRunnable->SetHaveUploadListeners(hasUploadListeners);
|
||||||
|
|
||||||
|
mStateData.mFlagSend = true;
|
||||||
|
|
||||||
if (!aRunnable->Dispatch(cx)) {
|
if (!aRunnable->Dispatch(cx)) {
|
||||||
// Dispatch() may have spun the event loop and we may have already unrooted.
|
// Dispatch() may have spun the event loop and we may have already unrooted.
|
||||||
// If so we don't want autoUnpin to try again.
|
// If so we don't want autoUnpin to try again.
|
||||||
|
@ -1879,7 +1881,11 @@ XMLHttpRequest::SendInternal(SendRunnable* aRunnable,
|
||||||
|
|
||||||
autoUnpin.Clear();
|
autoUnpin.Clear();
|
||||||
|
|
||||||
if (!autoSyncLoop->Run()) {
|
bool succeeded = autoSyncLoop->Run();
|
||||||
|
mStateData.mFlagSend = false;
|
||||||
|
|
||||||
|
if (!succeeded) {
|
||||||
|
// Somehow we didn't throw. Throw now.
|
||||||
aRv.Throw(NS_ERROR_FAILURE);
|
aRv.Throw(NS_ERROR_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2083,7 +2089,7 @@ XMLHttpRequest::Send(ErrorResult& aRv)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mProxy) {
|
if (!mProxy || mStateData.mFlagSend) {
|
||||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,11 +44,12 @@ public:
|
||||||
nsresult mResponseTextResult;
|
nsresult mResponseTextResult;
|
||||||
nsresult mStatusResult;
|
nsresult mStatusResult;
|
||||||
nsresult mResponseResult;
|
nsresult mResponseResult;
|
||||||
|
bool mFlagSend; // TenFourFox issue 600 (backbugs for M1588248)
|
||||||
|
|
||||||
StateData()
|
StateData()
|
||||||
: mStatus(0), mReadyState(0), mResponse(JS::UndefinedValue()),
|
: mStatus(0), mReadyState(0), mResponse(JS::UndefinedValue()),
|
||||||
mResponseTextResult(NS_OK), mStatusResult(NS_OK),
|
mResponseTextResult(NS_OK), mStatusResult(NS_OK),
|
||||||
mResponseResult(NS_OK)
|
mResponseResult(NS_OK), mFlagSend(false)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4737,9 +4737,10 @@ class MCreateThis
|
||||||
return getOperand(0);
|
return getOperand(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Although creation of |this| modifies global state, it is safely repeatable.
|
// Performs a property read from |newTarget| iff |newTarget| is a JSFunction
|
||||||
|
// with an own |.prototype| property.
|
||||||
AliasSet getAliasSet() const override {
|
AliasSet getAliasSet() const override {
|
||||||
return AliasSet::None();
|
return AliasSet::Load(AliasSet::Any);
|
||||||
}
|
}
|
||||||
bool possiblyCalls() const override {
|
bool possiblyCalls() const override {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user