From 86fcb68a5f28db8494a19c50d7c9c421778f9d52 Mon Sep 17 00:00:00 2001 From: Lei Shi Date: Thu, 15 Feb 2018 03:07:43 -0800 Subject: [PATCH] deps: update ChakraCore to Microsoft/ChakraCore@22f9ab82ae [1.8>1.9] [MERGE #4681 @leirocks] more xdata fix for debugger attaching/detaching Merge pull request #4681 from leirocks:xdatadebugger codegen can happen before OnDebuggerAttach/Detach returns, we need to clear the function table before the code gen happens. Reviewed-By: chakrabot --- .../core/lib/Runtime/Base/ScriptContext.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp b/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp index a349549c322..dfbc90cfb14 100644 --- a/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp +++ b/deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp @@ -3156,6 +3156,13 @@ namespace Js // Disable QC while functions are re-parsed as this can be time consuming AutoDisableInterrupt autoDisableInterrupt(this->threadContext, false /* explicitCompletion */); +#if ENABLE_NATIVE_CODEGEN +#if PDATA_ENABLED && defined(_WIN32) + // RundownSourcesAndReparse can cause code generation immediately, clear the leftovers if background thread didn't finish the work + DelayDeletingFunctionTable::Clear(); +#endif +#endif + hr = this->GetDebugContext()->RundownSourcesAndReparse(shouldPerformSourceRundown, /*shouldReparseFunctions*/ true); if (this->IsClosed()) @@ -3282,6 +3289,13 @@ namespace Js // Disable QC while functions are re-parsed as this can be time consuming AutoDisableInterrupt autoDisableInterrupt(this->threadContext, false /* explicitCompletion */); +#if ENABLE_NATIVE_CODEGEN +#if PDATA_ENABLED && defined(_WIN32) + // RundownSourcesAndReparse can cause code generation immediately, clear the leftovers if background thread didn't finish the work + DelayDeletingFunctionTable::Clear(); +#endif +#endif + // Force a reparse so that indirect function caches are updated. hr = this->GetDebugContext()->RundownSourcesAndReparse(/*shouldPerformSourceRundown*/ false, /*shouldReparseFunctions*/ true);