Fixed an ASSERT(m_actualSelfTime <= m_actualTotalTime) when starting
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jun 2008 04:39:23 +0000 (04:39 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Jun 2008 04:39:23 +0000 (04:39 +0000)
commit2c5372354876ff39e63015d08bad343c99ca0848
treec0abc01347bd633391c799f808dc479f54730790
parent4cf1e5af6cf8586f4e110fa1725f9c68d384b9f9
    Fixed an ASSERT(m_actualSelfTime <= m_actualTotalTime) when starting
        and stopping a profile from the Develop menu. Also prevents
        inserting an incorrect parent node as the new head after profiling
        is stopped from the Develop menu.

        Reviewed by Dan Bernstein.

        * profiler/Profile.cpp:
        (KJS::Profile::stopProfiling): If the current node is already the head
        then there is no more need to record future nodes in didExecute.
        (KJS::Profile::didExecute): Move the code of setupCurrentNodeAsStopped
        into here since this was the only caller. When setting the total time
        keep any current total time while adding the self time of the head.
        (KJS::Profile::setupCurrentNodeAsStopped): Removed.
        * profiler/Profile.h: Removed setupCurrentNodeAsStopped.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/profiler/Profile.cpp
JavaScriptCore/profiler/Profile.h