SourceCode should be copied when generating bytecode for functions
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2019 12:21:00 +0000 (12:21 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 13 Feb 2019 12:21:00 +0000 (12:21 +0000)
commit81f8f8c0cb89551f21dcca55cd3d6f612a61a49c
tree55b48c3953284a5a4aae26ca2aaae57304296b83
parent7cfa059a544d53296d4b6bd2053516f5c92d9766
SourceCode should be copied when generating bytecode for functions
https://bugs.webkit.org/show_bug.cgi?id=194536

Reviewed by Saam Barati.

The FunctionExecutable might be collected while generating the bytecode
for nested functions, in which case the SourceCode reference would no
longer be valid.

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

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CodeCache.cpp