LibJS: Avoid allocations in the Exception constructor

This commit is contained in:
Gunnar Beutner 2021-06-03 12:46:11 +02:00 committed by Linus Groh
parent 8b449214af
commit 32ee195d62

View file

@ -26,14 +26,14 @@ public:
virtual ~Exception() override = default; virtual ~Exception() override = default;
Value value() const { return m_value; } Value value() const { return m_value; }
const Vector<TracebackFrame>& traceback() const { return m_traceback; } const Vector<TracebackFrame, 32>& traceback() const { return m_traceback; }
private: private:
virtual const char* class_name() const override { return "Exception"; } virtual const char* class_name() const override { return "Exception"; }
virtual void visit_edges(Visitor&) override; virtual void visit_edges(Visitor&) override;
Value m_value; Value m_value;
Vector<TracebackFrame> m_traceback; Vector<TracebackFrame, 32> m_traceback;
}; };
} }