diff options
author | Steve Block <steveblock@google.com> | 2011-05-18 13:36:51 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-24 15:38:28 +0100 |
commit | 2fc2651226baac27029e38c9d6ef883fa32084db (patch) | |
tree | e396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/loader/cache/CachedScript.cpp | |
parent | b3725cedeb43722b3b175aaeff70552e562d2c94 (diff) | |
download | external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2 |
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/loader/cache/CachedScript.cpp')
-rw-r--r-- | Source/WebCore/loader/cache/CachedScript.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/WebCore/loader/cache/CachedScript.cpp b/Source/WebCore/loader/cache/CachedScript.cpp index 8950ddb..bfd39c5 100644 --- a/Source/WebCore/loader/cache/CachedScript.cpp +++ b/Source/WebCore/loader/cache/CachedScript.cpp @@ -55,9 +55,18 @@ CachedScript::~CachedScript() { } +void CachedScript::didAddClient(CachedResourceClient* c) +{ + if (m_decodedDataDeletionTimer.isActive()) + m_decodedDataDeletionTimer.stop(); + + CachedResource::didAddClient(c); +} + void CachedScript::allClientsRemoved() { - m_decodedDataDeletionTimer.startOneShot(0); + if (double interval = memoryCache()->deadDecodedDataDeletionInterval()) + m_decodedDataDeletionTimer.startOneShot(interval); } void CachedScript::setEncoding(const String& chs) @@ -79,7 +88,6 @@ const String& CachedScript::script() m_script += m_decoder->flush(); setDecodedSize(m_script.length() * sizeof(UChar)); } - m_decodedDataDeletionTimer.startOneShot(0); return m_script; } @@ -117,7 +125,9 @@ void CachedScript::destroyDecodedData() m_script = String(); unsigned extraSize = 0; #if USE(JSC) - // FIXME: SourceInfoCache should be wiped out too but not this easily. + if (m_sourceProviderCache) + m_sourceProviderCache->clear(); + extraSize = m_sourceProviderCache ? m_sourceProviderCache->byteSize() : 0; #endif setDecodedSize(extraSize); |