fix: DictionaryAdapter missing handle scopes and locks #90
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.
Fixes EddyVerbruggen/nativescript-plugin-firebase#1728, which seems to have been due to thread switching in the callback at FIRFunctions.m#L187. This issue will affect any native library functions called with a JavaScript object which are then wrapped in a DictionaryAdapter, and then attempt to access or enumerate the DictionaryAdapters contents from another thread.
I have not worked in Objective C nor with V8 internals before. This pull request needs a careful review and testing. Thank you @darind for pointing me in the right direction.