Пример #1
0
void XMLHttpRequest::abort()
{
    bool hadJob = m_job;

    if (hadJob) {
        m_job->kill();
        m_job = 0;
    }
    m_decoder = 0;
    m_aborted = true;

    if (hadJob) {
        {
            KJS::JSLock lock;
            gcUnprotectNullTolerant(KJS::ScriptInterpreter::getDOMObject(this));
        }
        deref();
    }
}
Пример #2
0
void XMLHttpRequest::abort()
{
    bool hadLoader = m_loader;

    if (hadLoader) {
        m_loader->stopLoading();
        m_loader = 0;
    }

    m_decoder = 0;
    m_aborted = true;

    if (hadLoader) {
        {
#ifdef __OWB_JS__
            KJS::JSLock lock;
            gcUnprotectNullTolerant(KJS::ScriptInterpreter::getDOMObject(this));
#endif
        }
        deref();
    }
}