Skip to content

Conversation

@slavam2605
Copy link
Collaborator

There is a following scenario:

  1. SomeModel: RdExtBase is created on one side of a protocol
  2. On the other side 1ProtocolExtListenerManager1 creates and binds this extension
  3. In RdExtBase.init > Protocol.submitExtCreated all listeners are invoked
  4. One of the listeners invokes SomeModel.getOrCreateExtension("mySubModel")
  5. This sub-extension is created and bound
  6. When all listeners are invoked, RdExtBase.init continues and tries to bind all its bindableChildren
  7. Sub-extension is already there and is already bound => we get a failed assert about binding already bound model

To fix this case, we can check that an extension is already bound and bound to us as a parent. Then we have no need to bind it again.

@slavam2605 slavam2605 requested a review from Iliya-usov May 9, 2023 12:53
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