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

fix: Cannot read property of null for bgTokenizer after session is destroyed #4713

Merged
merged 3 commits into from
May 30, 2022

Conversation

andrewnester
Copy link
Contributor

Issue #, if available: #4711

Description of changes:
Always set bgTokenizer when edit session is created and never set it to null. Instead use session.destroyed flag and remove all listeners from bgTokenizer.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@andrewnester andrewnester requested a review from nightwing May 29, 2022 12:21
@codecov
Copy link

codecov bot commented May 29, 2022

Codecov Report

Merging #4713 (57e05cd) into master (bf2c7e2) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4713      +/-   ##
==========================================
- Coverage   71.19%   71.11%   -0.08%     
==========================================
  Files         553      554       +1     
  Lines       55598    55706     +108     
  Branches    10392    10418      +26     
==========================================
+ Hits        39584    39617      +33     
- Misses      16014    16089      +75     
Flag Coverage Δ
unittests 71.11% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/ace/background_tokenizer.js 97.08% <100.00%> (+0.18%) ⬆️
lib/ace/edit_session.js 85.68% <100.00%> (+0.17%) ⬆️
lib/ace/edit_session_test.js 98.25% <100.00%> (+0.01%) ⬆️
lib/ace/editor.js 79.66% <100.00%> (+0.01%) ⬆️
lib/ace/worker/mirror.js 51.35% <0.00%> (-9.26%) ⬇️
lib/ace/lib/dom.js 83.59% <0.00%> (-1.27%) ⬇️
lib/ace/ext/code_lens.js 91.60% <0.00%> (-0.48%) ⬇️
lib/ace/keyboard/textinput.js 75.45% <0.00%> (-0.26%) ⬇️
lib/ace/autocomplete/popup.js 78.19% <0.00%> (ø)
lib/ace/mode/php_completions.js 26.08% <0.00%> (ø)
... and 6 more

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 bf2c7e2...57e05cd. Read the comment docs.

@andrewnester andrewnester requested a review from nightwing May 30, 2022 15:37
@andrewnester andrewnester merged commit d604f52 into ajaxorg:master May 30, 2022
@andrewnester andrewnester deleted the fix-bg-tokenizer-null branch May 30, 2022 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants