Remove weak callback from __postFrameCallback cache #1755
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In preparation for upgrading V8 to 11.x, we need to remove uses of
kFinalizer
weak callbacks because V8 no longer supports them. One was used to clean up the cache entries for__postFrameCallback()
callbacks, but that isn't necessary; we can just do the cleanup after the callback runs.Also fixes a bug where sometimes a frame callback never got called.
Includes various cleanups in CallbackHanders.cpp and CallbackHanders.h, as well as a few misc commits left over from some of the upgrade work I did in February (the first 3 commits in the stack).
Does your pull request have unit tests?
__postFrameCallback()
doesn't have a unit test. (If one is needed, let me know and I can write one.)I tested this by adding the following snippet to the test-app: