CodeCache should check that the UnlinkedCodeBlock was successfully created before...
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Apr 2019 08:54:19 +0000 (08:54 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Apr 2019 08:54:19 +0000 (08:54 +0000)
commit30ecf9b83d8082eb9885584b49df071cd4cc5043
tree5ad40644548201eb074dc745a8dbfcc54b8b5820
parent9664be5d47f5b197faa205115387651bcf788048
CodeCache should check that the UnlinkedCodeBlock was successfully created before caching it
https://bugs.webkit.org/show_bug.cgi?id=196880

Reviewed by Yusuke Suzuki.

JSTests:

* stress/bytecode-cache-syntax-error.js: Added.
(catch):

Source/JavaScriptCore:

CodeCache should not tell the SourceProvider to cache the bytecode if it failed
to create the UnlinkedCodeBlock.

* runtime/CodeCache.cpp:
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

Tools:

Add a new function for bytecode cache tests that does not forceDiskCache
for the second run: runBytecodeCacheNoAssetion. This is necessary for the
test added in this patch, since the code is invalid and therefore won't be
cached. It should also be useful for tests that evaluate dynamically
generated code.

* Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh:
* Scripts/run-jsc-stress-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/stress/bytecode-cache-syntax-error.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CodeCache.cpp
Tools/ChangeLog
Tools/Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper.sh
Tools/Scripts/run-jsc-stress-tests