mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792834 - 'Make sure to always set errors on failed requests'. r=khuey.
This commit is contained in:
parent
1e818bad1c
commit
da36cf378c
@ -81,12 +81,6 @@ IDBRequest::NotifyHelperCompleted(HelperBase* aHelper)
|
||||
NS_ASSERTION(!mHaveResultOrErrorCode, "Already called!");
|
||||
NS_ASSERTION(JSVAL_IS_VOID(mResultVal), "Should be undefined!");
|
||||
|
||||
// See if our window is still valid. If not then we're going to pretend that
|
||||
// we never completed.
|
||||
if (NS_FAILED(CheckInnerWindowCorrectness())) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mHaveResultOrErrorCode = true;
|
||||
|
||||
nsresult rv = aHelper->GetResultCode();
|
||||
@ -97,6 +91,12 @@ IDBRequest::NotifyHelperCompleted(HelperBase* aHelper)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// See if our window is still valid. If not then we're going to pretend that
|
||||
// we never completed.
|
||||
if (NS_FAILED(CheckInnerWindowCorrectness())) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Otherwise we need to get the result from the helper.
|
||||
JSContext* cx = GetJSContext();
|
||||
if (!cx) {
|
||||
|
Loading…
Reference in New Issue
Block a user