Skip to content

Rc/2.4.0#42

Open
tompsota wants to merge 13 commits intomainfrom
rc/2.4.0
Open

Rc/2.4.0#42
tompsota wants to merge 13 commits intomainfrom
rc/2.4.0

Conversation

@tompsota
Copy link
Member

What's new

Describe the PR shortly

PR checklist

In-app checks:

  • callbacks are received
  • dev/prod switch works
  • README.md is updated (if applicable)
  • example app is working

Pre-release checks:

  • CHANGELOG.md is updated
  • package.json version is increased
  • release label is applied on PR

To be checked by maintainers:

  • freeRASP logs are received
  • sdkVersion property in logs is correct
  • sdkPlatform property in logs is correct

Resolved issues

list of issues resolved by this PR

@tompsota tompsota added the release Create release after merging this PR label Feb 13, 2026
Copy link
Contributor

@martinzigrai martinzigrai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in Flutter and RN.

To make it completely thread-safe, we should ensure all external calls happen
after releasing the lock. The abstract flow should look like this:

For setting the listener (flush):

  1. Lock -> Assign the listener -> Copy cache to a temp list -> Clear cache -> Unlock.
  2. Iterate over the temp list and invoke the listener.

For dispatching a new event:

  1. Lock -> Check if the listener exists.
  2. If YES: Grab the listener reference -> Unlock -> Invoke the listener.
  3. If NO: Add the event to cache -> Unlock.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as in the ExecutionStateDispatcher.kt‎

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Automation is Android-only, remove this.Automation from the iOS array.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the plugin is destroyed but the application process remains alive, the singleton will continue to hold the old Context, causing a memory leak. Therefore, the handleOnDestroy method should be overridden to release the dispatcher listeners.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onDestroy() is not guaranteed to be called in the Android activity lifecycle, so this is not the best place for such actions. However, yes I will add this

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

Labels

release Create release after merging this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments