WebKit Bugzilla
Attachment 361792 Details for
Bug 194535
: CodeBlocks read from disk should not be re-written
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194535-20190212142711.patch (text/plain), 2.73 KB, created by
Tadeu Zagallo
on 2019-02-12 05:27:42 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tadeu Zagallo
Created:
2019-02-12 05:27:42 PST
Size:
2.73 KB
patch
obsolete
>Subversion Revision: 241291 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 608249f7f276994737bd7817a105f0853a0dde39..10c5be252b55107ebff30f419e88fc364ca16bd2 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-12 Tadeu Zagallo <tzagallo@apple.com> >+ >+ CodeBlocks read from disk should not be re-written >+ https://bugs.webkit.org/show_bug.cgi?id=194535 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Keep track of which CodeBlocks have been read from disk or have already >+ been serialized in CodeCache. >+ >+ * runtime/CodeCache.cpp: >+ (JSC::CodeCache::write): >+ * runtime/CodeCache.h: >+ (JSC::SourceCodeValue::SourceCodeValue): >+ (JSC::CodeCacheMap::fetchFromDiskImpl): >+ > 2019-02-11 Mark Lam <mark.lam@apple.com> > > Randomize insertion of deallocated StructureIDs into the StructureIDTable's free list. >diff --git a/Source/JavaScriptCore/runtime/CodeCache.cpp b/Source/JavaScriptCore/runtime/CodeCache.cpp >index b41e52651f3e7c9f6ecde23ffb9699c89db78657..d53aadabe111d39021ef3d01cfd457e498ab0637 100644 >--- a/Source/JavaScriptCore/runtime/CodeCache.cpp >+++ b/Source/JavaScriptCore/runtime/CodeCache.cpp >@@ -159,8 +159,12 @@ UnlinkedFunctionExecutable* CodeCache::getUnlinkedGlobalFunctionExecutable(VM& v > > void CodeCache::write(VM& vm) > { >- for (const auto& it : m_sourceCode) >+ for (auto& it : m_sourceCode) { >+ if (it.value.written) >+ continue; >+ it.value.written = true; > writeCodeBlock(vm, it.key, it.value); >+ } > } > > void generateUnlinkedCodeBlockForFunctions(VM& vm, UnlinkedCodeBlock* unlinkedCodeBlock, const SourceCode& parentSource, DebuggerMode debuggerMode, ParserError& error) >diff --git a/Source/JavaScriptCore/runtime/CodeCache.h b/Source/JavaScriptCore/runtime/CodeCache.h >index 80c0d95f9ef794952e5fbc683ee56650e0a021af..be44bddee99fe494e1885ca3e7791da6694f889d 100644 >--- a/Source/JavaScriptCore/runtime/CodeCache.h >+++ b/Source/JavaScriptCore/runtime/CodeCache.h >@@ -75,14 +75,16 @@ struct SourceCodeValue { > { > } > >- SourceCodeValue(VM& vm, JSCell* cell, int64_t age) >+ SourceCodeValue(VM& vm, JSCell* cell, int64_t age, bool written = false) > : cell(vm, cell) > , age(age) >+ , written(written) > { > } > > Strong<JSCell> cell; > int64_t age; >+ bool written; > }; > > class CodeCacheMap { >@@ -154,7 +156,7 @@ public: > return nullptr; > > VERBOSE_LOG("Found cached CodeBlock on disk"); >- addCache(key, SourceCodeValue(vm, unlinkedCodeBlock, m_age)); >+ addCache(key, SourceCodeValue(vm, unlinkedCodeBlock, m_age, true)); > return unlinkedCodeBlock; > #else > UNUSED_PARAM(vm);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
msaboff
:
review+
commit-queue
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194535
: 361792