本文整理汇总了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
}