Bug 135913 - Fix a memory leak in TypeSet
Summary: Fix a memory leak in TypeSet
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-13 16:18 PDT by Saam Barati
Modified: 2014-08-20 13:46 PDT (History)
1 user (show)

See Also:


Attachments
patch (6.25 KB, patch)
2014-08-20 10:57 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2014-08-13 16:18:17 PDT
There is currently a memory leak with the member variable: m_structureHistory. Fix it.
Comment 1 Saam Barati 2014-08-20 10:57:48 PDT
Created attachment 236882 [details]
patch

Fixes the memory leak.
Comment 2 WebKit Commit Bot 2014-08-20 12:28:02 PDT
Comment on attachment 236882 [details]
patch

Clearing flags on attachment: 236882

Committed r172804: <http://trac.webkit.org/changeset/172804>
Comment 3 WebKit Commit Bot 2014-08-20 12:28:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Geoffrey Garen 2014-08-20 13:46:56 PDT
Comment on attachment 236882 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=236882&action=review

> Source/JavaScriptCore/runtime/TypeSet.cpp:120
> +        RefPtr<StructureShape> shape = m_structureHistory.at(i);

Can you use bracket access instead of .at() in all this code?