Changeset 37972 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Oct 29, 2008, 8:02:31 AM (17 years ago)
Author:
[email protected]
Message:

Emit the WillExecuteStatement debugger hook before the "else" body when there is no block for the "else" body. This allows breakpoints on those statements in the Web Inspector.

JavaScriptCore:

2008-10-28 Timothy Hatcher <[email protected]>

Emit the WillExecuteStatement debugger hook before the "else" body
when there is no block for the "else" body. This allows breakpoints
on those statements in the Web Inspector.

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

Reviewed by Maciej Stachowiak.

  • kjs/nodes.cpp: (JSC::IfElseNode::emitCode): Emit the WillExecuteStatement debugger hook before the else node if isn't a block.

WebCore:

2008-10-28 Timothy Hatcher <[email protected]>

Add a manual test that checks breakpoints on a blockless body of
an "else" statement.

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

Reviewed by Maciej Stachowiak.

  • manual-tests/inspector/debugger-pause-on-else-statements.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r37891 r37972  
    11591159
    11601160    generator.emitLabel(beforeElse.get());
     1161
     1162    if (!m_elseBlock->isBlock())
     1163        generator.emitDebugHook(WillExecuteStatement, m_elseBlock->firstLine(), m_elseBlock->lastLine());
     1164
    11611165    generator.emitNode(dst, m_elseBlock.get());
    11621166
Note: See TracChangeset for help on using the changeset viewer.