You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: Gleb Dubovik (BitBucket: dubglan, GitHub: dubglan)
When an instance of a class-based plugin is unregistered, it continues to receive hook calls from all items in the same file.
This happens because some hooks are sent through Node.ihook which is an instance of FSHookProxy. When FSHookProxy is created (on the first call of the given hook), it copies original HookCaller from PluginManager through HookRelay. _getcaller() -> HookCaller.new_cached_caller(). This creates a copy of all methods in HookCaller and even though the instance of the caller in PluginManager is refreshed on plugin removal, the copy in FSHookProxy is not refreshed and retains references to removed plugin methods.
Moreover, if new plugin is registered during test file execution (say, on the second test), it will not receive any hook calls. However, if new plugin exposes a hook that was never called before, that call will get through.
Is it an intended behavior that the set of hooks is frozen within one fspath?
Originally reported by: Gleb Dubovik (BitBucket: dubglan, GitHub: dubglan)
When an instance of a class-based plugin is unregistered, it continues to receive hook calls from all items in the same file.
This happens because some hooks are sent through Node.ihook which is an instance of FSHookProxy. When FSHookProxy is created (on the first call of the given hook), it copies original HookCaller from PluginManager through HookRelay. _getcaller() -> HookCaller.new_cached_caller(). This creates a copy of all methods in HookCaller and even though the instance of the caller in PluginManager is refreshed on plugin removal, the copy in FSHookProxy is not refreshed and retains references to removed plugin methods.
Moreover, if new plugin is registered during test file execution (say, on the second test), it will not receive any hook calls. However, if new plugin exposes a hook that was never called before, that call will get through.
Is it an intended behavior that the set of hooks is frozen within one fspath?
The text was updated successfully, but these errors were encountered: