mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Better fix.
This commit is contained in:
parent
ca366194b7
commit
f0f28b27cc
@ -1048,12 +1048,6 @@ txXSLTProcessor::processDefaultTemplate(ProcessorState* aPs,
|
||||
}
|
||||
}
|
||||
|
||||
PRBool
|
||||
FindUri(nsString& aElement, void *aData)
|
||||
{
|
||||
return !aElement.Equals(*NS_STATIC_CAST(nsAString*, aData));
|
||||
}
|
||||
|
||||
void
|
||||
txXSLTProcessor::processInclude(const nsAString& aHref,
|
||||
txListIterator* aImportFrame,
|
||||
@ -1061,8 +1055,7 @@ txXSLTProcessor::processInclude(const nsAString& aHref,
|
||||
{
|
||||
// make sure the include isn't included yet
|
||||
nsStringArray& stylesheetStack = aPs->getEnteredStylesheets();
|
||||
if (!stylesheetStack.EnumerateBackwards(FindUri,
|
||||
NS_CONST_CAST(nsAString*, &aHref))) {
|
||||
if (stylesheetStack.IndexOf(aHref) != -1) {
|
||||
aPs->receiveError(NS_LITERAL_STRING("Stylesheet includes itself. URI: ") +
|
||||
aHref, NS_ERROR_FAILURE);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user