This source file includes following definitions.
- m_oldErrorContext
- m_oldErrorContext
#include "config.h"
#include "core/xml/parser/XMLDocumentParserScope.h"
namespace WebCore {
ResourceFetcher* XMLDocumentParserScope::currentFetcher = 0;
XMLDocumentParserScope::XMLDocumentParserScope(ResourceFetcher* fetcher)
: m_oldFetcher(currentFetcher)
, m_oldGenericErrorFunc(xmlGenericError)
, m_oldStructuredErrorFunc(xmlStructuredError)
, m_oldErrorContext(xmlGenericErrorContext)
{
currentFetcher = fetcher;
}
XMLDocumentParserScope::XMLDocumentParserScope(ResourceFetcher* fetcher, xmlGenericErrorFunc genericErrorFunc, xmlStructuredErrorFunc structuredErrorFunc, void* errorContext)
: m_oldFetcher(currentFetcher)
, m_oldGenericErrorFunc(xmlGenericError)
, m_oldStructuredErrorFunc(xmlStructuredError)
, m_oldErrorContext(xmlGenericErrorContext)
{
currentFetcher = fetcher;
if (genericErrorFunc)
xmlSetGenericErrorFunc(errorContext, genericErrorFunc);
if (structuredErrorFunc)
xmlSetStructuredErrorFunc(errorContext, structuredErrorFunc);
}
XMLDocumentParserScope::~XMLDocumentParserScope()
{
currentFetcher = m_oldFetcher;
xmlSetGenericErrorFunc(m_oldErrorContext, m_oldGenericErrorFunc);
xmlSetStructuredErrorFunc(m_oldErrorContext, m_oldStructuredErrorFunc);
}
}