• Nick Stenning's avatar
    Ensure that frame-rpc event listeners are correctly torn down · 6ca273c1
    Nick Stenning authored
    When the client is destroyed, it's important that we correctly tear down
    the frame-rpc event listeners (bound to the document's `onmessage`
    event).
    
    These event listeners are responsible for relaying messages from the
    frame-rpc mechanism to various parts of the code on either side of the
    frame boundary, including the `AnnotationSync` component. If the
    frame-rpc channels aren't correctly torn down, they will hold a
    reference to the `Bridge` object, which in turn holds a reference to the
    `AnnotationSync` object, and thus old copies of `AnnotationSync` which
    should have been garbage-collected will continue to receive events from
    the brand new Hypothesis client.
    
    The most visible result of this problem was that repeated activation and
    deactivation of the client would result in increasing numbers of
    highlights being drawn on annotated text, as reported in
    hypothesis/h#3096.
    
    Fixes hypothesis/h#3096.
    6ca273c1
Name
Last commit
Last update
..
anchoring Loading commit data...
plugin Loading commit data...
test Loading commit data...
adder.html Loading commit data...
adder.js Loading commit data...
config.js Loading commit data...
guest.coffee Loading commit data...
highlighter.coffee Loading commit data...
host.coffee Loading commit data...
main.js Loading commit data...
pdf-sidebar.coffee Loading commit data...
range-util.js Loading commit data...
selections.js Loading commit data...
sidebar.coffee Loading commit data...