Browse Source

LibJS: Avoid allocations in the Exception constructor

Gunnar Beutner 4 years ago
parent
commit
32ee195d62
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Libraries/LibJS/Runtime/Exception.h

+ 2 - 2
Userland/Libraries/LibJS/Runtime/Exception.h

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