[MERGE #2249 @tcare] AutoRestoreFunctionInfo does not handle throw during initialization
[MERGE #2249 @tcare] AutoRestoreFunctionInfo does not handle throw during initialization

Merge pull request #2249 from tcare:redefer

Fixes OS 10106951.

Paul's recent change in #2149 misses a case where we throw during creation of the new function body. We then assert because we did not restore the original function body.

Fixed by detecting the case where the function has not been parsed and we did not finish creating the new function body, using the ParsableFunctionInfo to restore the original state.

mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore