registry: fix issues with dangling WpGlobal objects causing assertion failures
The main problem observed is when a link that is owned by a WpLink is removed from the server because one of the linked nodes is gone. This would cause the APPEARS_ON_REGISTRY flag to go away but the WpGlobal would still remain in the globals list... To fix this, forcibly remove the global from the globals list when it is removed from the registry, even if it is still owned by some proxy. The proxy at that point is unable to function anyway, because we make sure to destroy the pw_proxy by removing FEATURE_BOUND when the global is removed from the registry. Additionally, ref global->proxy before removing FEATURE_BOUND to prevent crashing. If the proxy owns the global and the pw-proxy-destroyed signal causes whoever owns the proxy to drop his reference, _deactivate() will crash because no-one will be holding a ref to the proxy.
Loading
Please register or sign in to comment