Emit the WillExecuteStatement debugger hook before the for loop body when the stateme...
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Oct 2008 18:49:52 +0000 (18:49 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Oct 2008 18:49:52 +0000 (18:49 +0000)
commitf396a9ef17af7346c9a409573b9e91a8a0bdd9b1
treee92db30432d52dcb1142de968356edea7f1a4e5c
parentf9901d6e0e786661777416337831375fe487f395
Emit the WillExecuteStatement debugger hook before the for loop body when the statement node for the body isn't a block. This allows breakpoints on those statements in the Web Inspector.

JavaScriptCore:

2008-10-31  Timothy Hatcher  <timothy@apple.com>

        Emit the WillExecuteStatement debugger hook before the for loop body
        when the statement node for the body isn't a block. This allows
        breakpoints on those statements in the Web Inspector.

        https://bugs.webkit.org/show_bug.cgi?id=22004

        Reviewed by Darin Adler.

        * kjs/nodes.cpp:
        (JSC::ForNode::emitCode): Emit the WillExecuteStatement
        debugger hook before the statement node if isn't a block.
        Also emit the WillExecuteStatement debugger hook for the
        loop as the first op-code.
        (JSC::ForInNode::emitCode): Ditto.

WebCore:

2008-10-31  Timothy Hatcher  <timothy@apple.com>

        Add manual tests that check breakpoints on a blockless body of "for" loops.

        https://bugs.webkit.org/show_bug.cgi?id=22004

        Reviewed by Darin Adler.

        * manual-tests/inspector/debugger-pause-on-for-in-statements.html: Added.
        * manual-tests/inspector/debugger-pause-on-for-statements.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@38040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/nodes.cpp
WebCore/ChangeLog
WebCore/manual-tests/inspector/debugger-pause-on-for-in-statements.html [new file with mode: 0644]
WebCore/manual-tests/inspector/debugger-pause-on-for-statements.html [new file with mode: 0644]