Ignore:
Timestamp:
Sep 27, 2011, 10:58:55 AM (14 years ago)
Author:
[email protected]
Message:

Implement Error.stack
https://bugs.webkit.org/show_bug.cgi?id=66994

Patch by Juan Carlos Montemayor Elosua <[email protected]> on 2011-09-27
Reviewed by Oliver Hunt.

Source/JavaScriptCore:

This patch utilizes topCallFrame to create a stack trace when
an error is thrown. Users will also be able to use the stack()
command in jsc to get arrays with stack trace information.

(JSC::getCallerLine):
(JSC::getSourceURLFromCallFrame):
(JSC::getStackFrameCodeType):
(JSC::Interpreter::getStackTrace):
(JSC::Interpreter::throwException):

  • interpreter/Interpreter.h:

(JSC::StackFrame::toString):

  • jsc.cpp:

(GlobalObject::finishCreation):
(functionJSCStack):

  • parser/Parser.h:

(JSC::Parser::parse):

  • runtime/CommonIdentifiers.h:
  • runtime/Error.cpp:

(JSC::addErrorInfo):

  • runtime/Error.h:

LayoutTests:

Unit tests that contain both normal and special cases for stack trace
generation.

  • fast/js/exception-properties-expected.txt:
  • fast/js/script-tests/exception-properties.js:
  • fast/js/script-tests/stack-trace.js: Added.

(printStack):
(hostThrower):
(callbacker):
(outer):
(inner):
(evaler):
(normalOuter):
(normalInner):
(scripterInner):
(scripterOuter):

  • fast/js/stack-trace-expected.txt: Added.
  • fast/js/stack-trace.html: Added.
  • platform/chromium/test_expectations.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r96087 r96131  
     12011-09-27  Juan Carlos Montemayor Elosua  <[email protected]>
     2
     3        Implement Error.stack
     4        https://bugs.webkit.org/show_bug.cgi?id=66994
     5
     6        Reviewed by Oliver Hunt.
     7
     8        This patch utilizes topCallFrame to create a stack trace when
     9        an error is thrown. Users will also be able to use the stack()
     10        command in jsc to get arrays with stack trace information.
     11
     12        * JavaScriptCore.exp:
     13        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
     14        * interpreter/Interpreter.cpp:
     15        (JSC::getCallerLine):
     16        (JSC::getSourceURLFromCallFrame):
     17        (JSC::getStackFrameCodeType):
     18        (JSC::Interpreter::getStackTrace):
     19        (JSC::Interpreter::throwException):
     20        * interpreter/Interpreter.h:
     21        (JSC::StackFrame::toString):
     22        * jsc.cpp:
     23        (GlobalObject::finishCreation):
     24        (functionJSCStack):
     25        * parser/Parser.h:
     26        (JSC::Parser::parse):
     27        * runtime/CommonIdentifiers.h:
     28        * runtime/Error.cpp:
     29        (JSC::addErrorInfo):
     30        * runtime/Error.h:
     31
    1322011-09-27  Carlos Garcia Campos  <[email protected]>
    233
Note: See TracChangeset for help on using the changeset viewer.