Changeset 241442 in webkit
- Timestamp:
- Feb 13, 2019, 10:50:20 AM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Source/JavaScriptCore/ChangeLog ¶
r241431 r241442 1 2019-02-13 Tadeu Zagallo <tzagallo@apple.com> 2 3 CodeBlocks read from disk should not be re-written 4 https://bugs.webkit.org/show_bug.cgi?id=194535 5 6 Reviewed by Michael Saboff. 7 8 Keep track of which CodeBlocks have been read from disk or have already 9 been serialized in CodeCache. 10 11 * runtime/CodeCache.cpp: 12 (JSC::CodeCache::write): 13 * runtime/CodeCache.h: 14 (JSC::SourceCodeValue::SourceCodeValue): 15 (JSC::CodeCacheMap::fetchFromDiskImpl): 16 1 17 2019-02-13 Tadeu Zagallo <tzagallo@apple.com> 2 18 -
TabularUnified trunk/Source/JavaScriptCore/runtime/CodeCache.cpp ¶
r241431 r241442 160 160 void CodeCache::write(VM& vm) 161 161 { 162 for (const auto& it : m_sourceCode) 162 for (auto& it : m_sourceCode) { 163 if (it.value.written) 164 continue; 165 it.value.written = true; 163 166 writeCodeBlock(vm, it.key, it.value); 167 } 164 168 } 165 169 -
TabularUnified trunk/Source/JavaScriptCore/runtime/CodeCache.h ¶
r240511 r241442 76 76 } 77 77 78 SourceCodeValue(VM& vm, JSCell* cell, int64_t age )78 SourceCodeValue(VM& vm, JSCell* cell, int64_t age, bool written = false) 79 79 : cell(vm, cell) 80 80 , age(age) 81 , written(written) 81 82 { 82 83 } … … 84 85 Strong<JSCell> cell; 85 86 int64_t age; 87 bool written; 86 88 }; 87 89 … … 155 157 156 158 VERBOSE_LOG("Found cached CodeBlock on disk"); 157 addCache(key, SourceCodeValue(vm, unlinkedCodeBlock, m_age ));159 addCache(key, SourceCodeValue(vm, unlinkedCodeBlock, m_age, true)); 158 160 return unlinkedCodeBlock; 159 161 #else
Note:
See TracChangeset
for help on using the changeset viewer.