Ignore:
Timestamp:
Apr 30, 2009, 2:38:01 PM (16 years ago)
Author:
[email protected]
Message:

Add function to CallFrame for dumping the current JS caller

Reviewed by Gavin Barraclough.

Added debug only method CallFrame::dumpCaller() that provide the call location
of the deepest currently executing JS function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/CallFrame.cpp

    r42989 r43096  
    2828
    2929#include "CodeBlock.h"
     30#include "Interpreter.h"
    3031
    3132namespace JSC {
     
    3637}
    3738
     39#ifndef NDEBUG
     40void CallFrame::dumpCaller()
     41{
     42    int signedLineNumber;
     43    intptr_t sourceID;
     44    UString urlString;
     45    JSValuePtr function;
     46   
     47    interpreter()->retrieveLastCaller(this, signedLineNumber, sourceID, urlString, function);
     48    printf("Callpoint => %s:%d\n", urlString.ascii(), signedLineNumber);
    3849}
     50#endif
     51
     52}
Note: See TracChangeset for help on using the changeset viewer.