Exception stack traces aren't complete when the exception starts in native code
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 22:26:36 +0000 (22:26 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Apr 2012 22:26:36 +0000 (22:26 +0000)
commit4d4097ae4b24bd08ec0bb3be83351a5c8ad0d3f7
treed3dbb71c2cc29b99cffd761e1ce572e0ba1eac64
parente05230b14663ad746df8ae71bd698ddba9c51216
Exception stack traces aren't complete when the exception starts in native code
https://bugs.webkit.org/show_bug.cgi?id=84073

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

Refactored building the stack trace to so that we can construct
it earlier, and don't rely on any prior work performed in the
exception handling machinery. Also updated LLInt and the DFG to
completely initialise the callframes of host function calls.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::codeOriginIndexForReturn):
(CodeBlock):
* dfg/DFGOperations.cpp:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::getStackTrace):
(JSC::Interpreter::addStackTraceIfNecessary):
(JSC):
(JSC::Interpreter::throwException):
* interpreter/Interpreter.h:
(Interpreter):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(functionJSCStack):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::handleHostCall):
* parser/Parser.h:
(JSC::::parse):
* runtime/Error.cpp:
(JSC::addErrorInfo):
(JSC::throwError):
* runtime/Error.h:
(JSC):

LayoutTests:

Update tests to include new exception property ordering, and new functions

* fast/js/exception-properties-expected.txt:
* fast/js/script-tests/exception-properties.js:
* fast/js/script-tests/stack-trace.js:
(selfRecursive1): Modified slightly so that we produce consistent traces
* fast/js/stack-trace-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/js/exception-properties-expected.txt
LayoutTests/fast/js/script-tests/exception-properties.js
LayoutTests/fast/js/script-tests/stack-trace.js
LayoutTests/fast/js/stack-trace-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/bytecode/CodeBlock.h
Source/JavaScriptCore/dfg/DFGOperations.cpp
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/interpreter/Interpreter.h
Source/JavaScriptCore/jit/JITStubs.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
Source/JavaScriptCore/parser/Parser.h
Source/JavaScriptCore/runtime/Error.cpp
Source/JavaScriptCore/runtime/Error.h