Ignore:
Timestamp:
Dec 5, 2007, 2:48:48 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Geoff.

  • Wait until local variable data is fully constructed before notifying the debugger of entering or leaving a call frame.
  • kjs/function.cpp: (KJS::FunctionImp::callAsFunction):
  • kjs/nodes.cpp: (KJS::FunctionBodyNode::execute):
File:
1 edited

Legend:

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

    r28110 r28458  
    7878    newExec.setException(exec->exception());
    7979
    80   Debugger* dbg = exec->dynamicInterpreter()->debugger();
    81   int sourceId = -1;
    82   int lineNo = -1;
    83   if (dbg) {
    84     sourceId = body->sourceId();
    85     lineNo = body->firstLine();
    86 
    87     bool cont = dbg->callEvent(&newExec, sourceId, lineNo, this, args);
    88     if (!cont) {
    89       dbg->imp()->abort();
    90       return jsUndefined();
    91     }
    92   }
    93 
    9480  Completion comp = execute(&newExec);
    9581
     
    9783  if (newExec.hadException())
    9884    comp = Completion(Throw, newExec.exception());
    99 
    100   // The debugger may have been deallocated by now if the WebFrame
    101   // we were running in has been destroyed, so refetch it.
    102   // See http://bugs.webkit.org/show_bug.cgi?id=9477
    103   dbg = exec->dynamicInterpreter()->debugger();
    104 
    105   if (dbg) {
    106     lineNo = body->lastLine();
    107 
    108     if (comp.complType() == Throw)
    109         newExec.setException(comp.value());
    110 
    111     int cont = dbg->returnEvent(&newExec, sourceId, lineNo, this);
    112     if (!cont) {
    113       dbg->imp()->abort();
    114       return jsUndefined();
    115     }
    116   }
    11785
    11886  if (comp.complType() == Throw) {
Note: See TracChangeset for help on using the changeset viewer.