JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=41948
authorGeoffrey Garen <ggaren@apple.com>
Wed, 27 Oct 2010 17:59:57 +0000 (17:59 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Mon, 21 Feb 2011 14:06:02 +0000 (11:06 -0300)
commit5386b0f5e50b6d7afa816be8d9bf7d86d81f224c
tree930cba4b5f6fd77617c0e5327dfdcf7f6fb9df45
parent47a7aae67c7752d609721d6ce92c43e3624b4733
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: http://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]