JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=41948
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Oct 2010 17:59:57 +0000 (17:59 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Oct 2010 17:59:57 +0000 (17:59 +0000)
commitdc079046c2b8285dbb2273f9c3cc91f1b3942e27
tree41d823db87ad3c3c0492ae4a15a1b8f32c706da4
parentdd2a816f7e5b5df0118be5afa6f1d3ae94ce44d7
JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=41948
REGRESSION(r60392): Registerfile can be unwound too far following an exception

Reviewed by Oliver Hunt.

SunSpider reports no change.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::throwException): Walk the stack to calculate the high
water mark currently in use. It's not safe to assume that the current
CallFrame's high water mark is the highest high water mark because
calls do not always set up at the end of a CallFrame. A large caller
CallFrame can encompass a small callee CallFrame.

* jit/JITOpcodes.cpp:
(JSC::JIT::privateCompileCTINativeCall):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
in the CallFrame of a host call, like the Interpreter does, instead of
leaving the CodeBlock field uninitialized. The backtracing code requires
a valid CodeBlock field in each CallFrame.

LayoutTests: Added a test for:

Reviewed by Oliver Hunt.

https://bugs.webkit.org/show_bug.cgi?id=41948
REGRESSION(r60392): Registerfile can be unwound too far following an exception

* fast/js/exception-registerfile-shrink-expected.txt: Added.
* fast/js/exception-registerfile-shrink.html: Added.
* fast/js/script-tests/exception-registerfile-shrink.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@70673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/interpreter/Interpreter.cpp
JavaScriptCore/jit/JITOpcodes.cpp
JavaScriptCore/jit/JITOpcodes32_64.cpp
LayoutTests/ChangeLog
LayoutTests/fast/js/exception-registerfile-shrink-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/exception-registerfile-shrink.html [new file with mode: 0644]
LayoutTests/fast/js/script-tests/exception-registerfile-shrink.js [new file with mode: 0644]