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


Ignore:
Timestamp:
Sep 23, 2008, 11:37:18 AM (17 years ago)
Author:
[email protected]
Message:

2008-09-23 Kevin McCullough <[email protected]>

Reviewed by Darin.

Bug 21030: The JS debugger breaks on the do of a do-while not the while
(where the conditional statement is)
https://bugs.webkit.org/show_bug.cgi?id=21030
Now the statementListEmitCode detects if a do-while node is being
emited and emits the debug hook on the last line instead of the first.

This change had no effect on sunspider.

  • kjs/nodes.cpp: (JSC::statementListEmitCode):
  • kjs/nodes.h: (JSC::StatementNode::isDoWhile): (JSC::DoWhileNode::isDoWhile):
File:
1 edited

Legend:

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

    r36794 r36809  
    10851085    for (StatementVector::iterator it = statements.begin(); it != end; ++it) {
    10861086        StatementNode* n = it->get();
    1087         generator.emitDebugHook(WillExecuteStatement, n->firstLine(), n->lastLine());
     1087        generator.emitDebugHook(WillExecuteStatement, n->isDoWhile() ? n->lastLine() : n->firstLine(), n->lastLine());
    10881088        generator.emitNode(dst, n);
    10891089    }
Note: See TracChangeset for help on using the changeset viewer.