LibJS+LibWeb: Log JavaScript exceptions raised by web content

Instead of hiding JS exceptions raised on the web, we now print them to
the debug log. This will make it a bit easier to work out why some web
pages aren't working right. :^)
This commit is contained in:
Andreas Kling 2020-11-29 16:48:14 +01:00
commit 01c8765519
Notes: sideshowbarker 2024-07-19 01:11:51 +09:00
3 changed files with 10 additions and 4 deletions

View file

@ -75,6 +75,9 @@ public:
static NonnullRefPtr<VM> create();
~VM();
bool should_log_exceptions() const { return m_should_log_exceptions; }
void set_should_log_exceptions(bool b) { m_should_log_exceptions = b; }
Heap& heap() { return m_heap; }
const Heap& heap() const { return m_heap; }
@ -275,6 +278,8 @@ private:
#undef __JS_ENUMERATE
Shape* m_scope_object_shape { nullptr };
bool m_should_log_exceptions { false };
};
template<>