Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup and restore staticVariableClassMap when processing heap dumps #657

Merged
merged 2 commits into from
Oct 4, 2018

Conversation

JimSuplizio
Copy link
Contributor

What does this PR do?

When modifying the static variables for heap dump processing it turns out that the staticVariablesClassMap holds shallow copies of the ApexVariableContainers. What was happening is that these were getting modified as part of heap dump processing and not getting restored. The way this manifested itself was after stepping off checkpoint line one of static variable collections was showing all of the fields under "this". This was because of the variablesRef created when displaying the heap dump augmented variables had the same variablesRef value as "this" after things were restored and because the staticVariablesClassMap wasn't backed up with the rest of the stuff.

What issues does this PR fix or reference?

@W-5490706@

@lcampos
Copy link
Contributor

lcampos commented Oct 4, 2018

I've confirmed this fixes the issue mentioned on the description and the issue with values not being fetch from debug log after using values from a heapdump.

@codecov
Copy link

codecov bot commented Oct 4, 2018

Codecov Report

Merging #657 into develop will decrease coverage by 0.1%.
The diff coverage is 18.18%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #657      +/-   ##
===========================================
- Coverage    74.92%   74.82%   -0.11%     
===========================================
  Files          158      158              
  Lines         6394     6396       +2     
  Branches      1001     1001              
===========================================
- Hits          4791     4786       -5     
- Misses        1348     1355       +7     
  Partials       255      255
Impacted Files Coverage Δ
...orcedx-apex-replay-debugger/src/core/logContext.ts 63.72% <18.18%> (-2.6%) ⬇️
...de-core/src/commands/forceStartApexDebugLogging.ts 43.66% <0%> (-2.5%) ⬇️
...ages/salesforcedx-vscode-core/src/context/index.ts 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1dc100...371fc43. Read the comment docs.

@JimSuplizio JimSuplizio merged commit 2254d19 into develop Oct 4, 2018
@vazexqi vazexqi deleted the jsuplizio/staticVarRestoreFix branch July 9, 2019 18:07
@salesforce-cla
Copy link

salesforce-cla bot commented Aug 6, 2020

Thanks for the contribution! Unfortunately we can't verify the commit author(s): James Suplizio <j***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants