Skip to content
  • P V's avatar
    wp: invalidate WpGlobal id when removed from registry · 0446b4fe
    P V authored and George Kiagiadakis's avatar George Kiagiadakis committed
    Once an object is removed from the registry, its id is invalidated and
    can be later reused by other objects. WpGlobal objects may be
    long-lived: e.g. those in tmp_globals may live over an add,remove,add
    sequence for the same id, and a new WpGlobal must be used for the second
    add. However, currently e.g. wp_registry_prepare_new_global may pick the
    WpGlobal for a previously removed object from the tmp_globals list.
    
    To address this, invalidate the WpGlobal id immediately when we get the
    registry remove event.
    0446b4fe