mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 878325 - Propagate exceptions out of ResolveForwardReferences. r=bz
This commit is contained in:
parent
2dd3c038b4
commit
1061cd85c9
@ -1171,6 +1171,7 @@ XULDocument::ResolveForwardReferences()
|
||||
// guaranteed to converge because we've "closed the gate" to new
|
||||
// forward references.
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
const nsForwardReference::Phase* pass = nsForwardReference::kPasses;
|
||||
while ((mResolutionPhase = *pass) != nsForwardReference::eDone) {
|
||||
uint32_t previous = 0;
|
||||
@ -1185,8 +1186,10 @@ XULDocument::ResolveForwardReferences()
|
||||
nsForwardReference::Result result = fwdref->Resolve();
|
||||
|
||||
switch (result) {
|
||||
case nsForwardReference::eResolve_Succeeded:
|
||||
case nsForwardReference::eResolve_Error:
|
||||
rv = NS_ERROR_FAILURE;
|
||||
// Fall through.
|
||||
case nsForwardReference::eResolve_Succeeded:
|
||||
mForwardReferences.RemoveElementAt(i);
|
||||
|
||||
// fixup because we removed from list
|
||||
@ -1202,7 +1205,7 @@ XULDocument::ResolveForwardReferences()
|
||||
// Resolve() loaded a dynamic overlay,
|
||||
// (see XULDocument::LoadOverlayInternal()).
|
||||
// Return for now, we will be called again.
|
||||
return NS_OK;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1212,7 +1215,7 @@ XULDocument::ResolveForwardReferences()
|
||||
}
|
||||
|
||||
mForwardReferences.Clear();
|
||||
return NS_OK;
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user