当前位置: 首页>>代码示例>>C++>>正文


C++ ActiveDOMObject::scriptExecutionContext方法代码示例

本文整理汇总了C++中ActiveDOMObject::scriptExecutionContext方法的典型用法代码示例。如果您正苦于以下问题:C++ ActiveDOMObject::scriptExecutionContext方法的具体用法?C++ ActiveDOMObject::scriptExecutionContext怎么用?C++ ActiveDOMObject::scriptExecutionContext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ActiveDOMObject的用法示例。


在下文中一共展示了ActiveDOMObject::scriptExecutionContext方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ASSERT

ScriptExecutionContext::~ScriptExecutionContext()
{
    m_inDestructor = true;
    for (HashMap<ActiveDOMObject*, void*>::iterator iter = m_activeDOMObjects.begin(); iter != m_activeDOMObjects.end(); iter = m_activeDOMObjects.begin()) {
        ActiveDOMObject* object = iter->first;
        m_activeDOMObjects.remove(iter);
        ASSERT(object->scriptExecutionContext() == this);
        object->contextDestroyed();
    }

    HashSet<MessagePort*>::iterator messagePortsEnd = m_messagePorts.end();
    for (HashSet<MessagePort*>::iterator iter = m_messagePorts.begin(); iter != messagePortsEnd; ++iter) {
        ASSERT((*iter)->scriptExecutionContext() == this);
        (*iter)->contextDestroyed();
    }
#if ENABLE(SQL_DATABASE)
    if (m_databaseThread) {
        ASSERT(m_databaseThread->terminationRequested());
        m_databaseThread = 0;
    }
#endif
#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
    if (m_fileThread) {
        m_fileThread->stop();
        m_fileThread = 0;
    }
#endif

#if ENABLE(BLOB)
    HashSet<String>::iterator publicBlobURLsEnd = m_publicBlobURLs.end();
    for (HashSet<String>::iterator iter = m_publicBlobURLs.begin(); iter != publicBlobURLsEnd; ++iter)
        ThreadableBlobRegistry::unregisterBlobURL(KURL(ParsedURLString, *iter));

    HashSet<DOMURL*>::iterator domUrlsEnd = m_domUrls.end();
    for (HashSet<DOMURL*>::iterator iter = m_domUrls.begin(); iter != domUrlsEnd; ++iter) {
        ASSERT((*iter)->scriptExecutionContext() == this);
        (*iter)->contextDestroyed();
    }
#endif

#if ENABLE(MEDIA_STREAM)
    HashSet<String>::iterator publicStreamURLsEnd = m_publicStreamURLs.end();
    for (HashSet<String>::iterator iter = m_publicStreamURLs.begin(); iter != publicStreamURLsEnd; ++iter)
        MediaStreamRegistry::registry().unregisterMediaStreamURL(KURL(ParsedURLString, *iter));
#endif
}
开发者ID:sysrqb,项目名称:chromium-src,代码行数:46,代码来源:ScriptExecutionContext.cpp


注:本文中的ActiveDOMObject::scriptExecutionContext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。