ladybird/Libraries/LibJS
Linus Groh 75dac35d0e LibJS: Stop unwinding and reset exception for TryStatement finalizer
This fixes two issues with running a TryStatement finalizer:

- Temporarily store and clear the exception, if any, so we can run the
  finalizer block statement without it getting in our way, which could
  have unexpected side effects otherwise (and will likely return early
  somewhere).
- Stop unwinding so more than one child node of the finalizer
  BlockStatement is executed if an exception has been thrown previously
  (which would have called unwind(ScopeType::Try)). Re-throwing as
  described above ensures we still unwind after the finalizer, if
  necessary.

Also add some tests specifically for try/catch/finally blocks, we
didn't have any!
2020-09-12 09:31:16 +02:00
..
Heap LibJS: Add a helper for calling JS::Function's with arguments 2020-08-26 08:45:01 +02:00
Runtime LibJS: Extract most of Interpreter's run() into execute_statement() 2020-09-12 09:31:16 +02:00
Tests LibJS: Stop unwinding and reset exception for TryStatement finalizer 2020-09-12 09:31:16 +02:00
AST.cpp LibJS: Stop unwinding and reset exception for TryStatement finalizer 2020-09-12 09:31:16 +02:00
AST.h LibJS: Initial class implementation; allow super expressions in object 2020-06-29 17:54:54 +02:00
CMakeLists.txt LibJS: Add StringIterator 2020-07-13 15:07:29 +02:00
Console.cpp LibJS: Eliminate some (unnecessary) Vector copies 2020-09-08 13:43:03 +02:00
Console.h LibJS: Move Interpreter::get_trace() to ConsoleClient 2020-06-02 15:22:34 +02:00
Forward.h LibWeb: Make btoa() and atob() correctly handle values between 128 and 255 2020-07-22 19:22:00 +02:00
Interpreter.cpp LibJS: Extract most of Interpreter's run() into execute_statement() 2020-09-12 09:31:16 +02:00
Interpreter.h LibJS: Extract most of Interpreter's run() into execute_statement() 2020-09-12 09:31:16 +02:00
Lexer.cpp LibJS: Fix start position of multi-line tokens 2020-09-12 00:13:29 +02:00
Lexer.h LibJS: Lex and parse regex literals, add RegExp objects 2020-06-07 19:06:55 +02:00
MarkupGenerator.cpp Browser: Escape JS source operators for HTML display in console 2020-07-23 23:01:16 +02:00
MarkupGenerator.h Meta: Add a script check the presence of "#pragma once" in header files 2020-05-29 07:59:45 +02:00
Parser.cpp LibJS: Avoid unnecessary lambda 2020-08-30 10:31:04 +02:00
Parser.h LibJS: Parser refactored to use constexpr precedence table 2020-08-21 16:14:14 +02:00
Token.cpp LibJS: Add missing reserved words to Token::is_identifier_name() 2020-08-14 10:58:51 +02:00
Token.h LibJS: Parser refactored to use constexpr precedence table 2020-08-21 16:14:14 +02:00