Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
deps: update ChakraCore to chakra-core/ChakraCore@22f9ab82ae
Browse files Browse the repository at this point in the history
[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 <[email protected]>
  • Loading branch information
leirocks authored and kfarnung committed Mar 7, 2018
1 parent 5449a09 commit 86fcb68
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions deps/chakrashim/core/lib/Runtime/Base/ScriptContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 86fcb68

Please sign in to comment.