Ignore:
Timestamp:
Jul 22, 2011, 5:19:05 PM (14 years ago)
Author:
[email protected]
Message:

Patch by Sommer Panage <[email protected]> on 2011-07-22
Reviewed by Oliver Hunt.

export JSContextCreateBacktrace as SPI in JSContextRefPrivate.h
https://bugs.webkit.org/show_bug.cgi?id=64981

UIAutomation for iOS would like to support a Javascript backtrace in our error logs.
Currently, the C API does not provide the tools to do this. However, the private API
does expose the necessary functionality to get a backtrace
(via Interpreter::retrieveLastCaller). We recognize this information may result in
failure in the cases of programs run by 'eval', stack frames beneath host function
call frames, and in programs run from other programs. Thus, we propose exporting our
JSContextCreateBacktrace in JSContextRefPrivate.h. This will provide us with the tools
we need while not advertising an API that isn't really ready for full use.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSContextRefPrivate.h

    r49802 r91627  
    4747JS_EXPORT JSGlobalContextRef JSContextGetGlobalContext(JSContextRef ctx);
    4848
     49   
     50/*!
     51@function
     52@abstract Gets a Backtrace for the existing context
     53@param ctx The JSContext whose backtrace you want to get
     54@result A string containing the backtrace
     55*/
     56JS_EXPORT JSStringRef JSContextCreateBacktrace(JSContextRef ctx, unsigned maxStackSize) AVAILABLE_IN_WEBKIT_VERSION_4_0;
     57   
    4958#ifdef __cplusplus
    5059}
Note: See TracChangeset for help on using the changeset viewer.