Ignore:
Timestamp:
Jan 6, 2012, 12:20:24 PM (13 years ago)
Author:
[email protected]
Message:

Use HashMap<OwnPtr> for SourceProviderCache items
https://bugs.webkit.org/show_bug.cgi?id=75346

Reviewed by Daniel Bates.

  • parser/Parser.cpp:
  • parser/SourceProviderCache.cpp:

(JSC::SourceProviderCache::clear):
(JSC::SourceProviderCache::add):

  • parser/SourceProviderCache.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/SourceProviderCache.cpp

    r95901 r104318  
    2727#include "SourceProviderCache.h"
    2828
    29 #include "SourceProviderCacheItem.h"
    30 
    3129namespace JSC {
    3230
     
    3836void SourceProviderCache::clear()
    3937{
    40     deleteAllValues(m_map);
    4138    m_map.clear();
    4239    m_contentByteSize = 0;
     
    5047void SourceProviderCache::add(int sourcePosition, PassOwnPtr<SourceProviderCacheItem> item, unsigned size)
    5148{
    52     m_map.add(sourcePosition, item.leakPtr());
     49    m_map.add(sourcePosition, item);
    5350    m_contentByteSize += size;
    5451}
Note: See TracChangeset for help on using the changeset viewer.