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


C++ ProfileGenerator::origin方法代码示例

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


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

示例1: stopProfiling

void Profiler::stopProfiling(JSGlobalObject* origin)
{
    for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) {
        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
        if (profileGenerator->origin() == origin) {
            profileGenerator->stopProfiling();
            m_currentProfiles.remove(i);
            if (!m_currentProfiles.size())
                origin->globalData().m_enabledProfiler = 0;
        }
    }
}
开发者ID:dog-god,项目名称:iptv,代码行数:12,代码来源:Profiler.cpp

示例2: stopProfiling

void LegacyProfiler::stopProfiling(JSGlobalObject* origin)
{
    for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) {
        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
        if (profileGenerator->origin() == origin) {
            profileGenerator->stopProfiling();
            m_currentProfiles.remove(i);
            if (!m_currentProfiles.size())
                origin->vm().setEnabledProfiler(nullptr);
        }
    }
}
开发者ID:WebKitNix,项目名称:webkitnix,代码行数:12,代码来源:LegacyProfiler.cpp

示例3: stopProfiling

void Profiler::stopProfiling(JSGlobalObject* origin)
{
    for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) {
        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
        if (profileGenerator->origin() == origin) {
            profileGenerator->stopProfiling();
            m_currentProfiles.remove(i);
            if (!m_currentProfiles.size())
                s_sharedEnabledProfilerReference = 0;
        }
    }
}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:12,代码来源:Profiler.cpp

示例4: startProfiling

void Profiler::startProfiling(ExecState* exec, const String& title)
{
    ASSERT_ARG(title, !title.isNull());

    // Check if we currently have a Profile for this global ExecState and title.
    // If so return early and don't create a new Profile.
    JSGlobalObject* origin = exec ? exec->lexicalGlobalObject() : 0;

    for (size_t i = 0; i < m_currentProfiles.size(); ++i) {
        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
        if (profileGenerator->origin() == origin && profileGenerator->title() == title)
            return;
    }

    exec->globalData().m_enabledProfiler = this;
    RefPtr<ProfileGenerator> profileGenerator = ProfileGenerator::create(exec, title, ++ProfilesUID);
    m_currentProfiles.append(profileGenerator);
}
开发者ID:dog-god,项目名称:iptv,代码行数:18,代码来源:Profiler.cpp

示例5:

PassRefPtr<Profile> Profiler::stopProfiling(ExecState* exec, const String& title)
{
    JSGlobalObject* origin = exec ? exec->lexicalGlobalObject() : 0;
    for (ptrdiff_t i = m_currentProfiles.size() - 1; i >= 0; --i) {
        ProfileGenerator* profileGenerator = m_currentProfiles[i].get();
        if (profileGenerator->origin() == origin && (title.isNull() || profileGenerator->title() == title)) {
            profileGenerator->stopProfiling();
            RefPtr<Profile> returnProfile = profileGenerator->profile();

            m_currentProfiles.remove(i);
            if (!m_currentProfiles.size())
                exec->globalData().m_enabledProfiler = 0;
            
            return returnProfile;
        }
    }

    return 0;
}
开发者ID:dog-god,项目名称:iptv,代码行数:19,代码来源:Profiler.cpp


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