In the struct Scope, the fuction pushLabel creates a LabelStack as needed that never gets cleaned up. void pushLabel(const Identifier* label, bool isLoop) { if (!m_labels) m_labels = new LabelStack; m_labels->append(ScopeLabelInfo(label->impl(), isLoop)); }
Created attachment 83857 [details] Added Destructor to clean up JSParser::Scope leak of ScopeLabelInfo Vector
Comment on attachment 83857 [details] Added Destructor to clean up JSParser::Scope leak of ScopeLabelInfo Vector View in context: https://bugs.webkit.org/attachment.cgi?id=83857&action=review I’d rather see m_labels be changed to an OwnPtr than just add the missing deletion. > Source/JavaScriptCore/parser/JSParser.cpp:300 > + if (m_labels) > + delete m_labels; The if isn’t needed. C++ defines the delete operator to do nothing if the pointer passed is null.
Committed r79749: <http://trac.webkit.org/changeset/79749>