• Randall Leeds's avatar
    Switch out jschannel for frame-rpc · f1b019f0
    Randall Leeds authored
    The frame-rpc module is a proper CommonJS module and it's footprint
    is really tiny. Its protocol is simpler. It doesn't handle connection
    and buffering, but with our onConnect callback we don't need buffering.
    The connection handshake that jschannel did was so trivial it's been
    re-implemented here (each side tries to connect to the other once).
    
    We have to handle timeouts ourselves, but that's all hidden in the
    bridge code. In exchange, we get a simpler API, we get rid of the
    call/notify distinction in favor of just passing a callback or not
    and we avoid the excess overhead of the recursion guard in the
    serialization code that was giving us false positive issues with
    the document title.
    
    This is one step toward removing all the browserify-shim requiring
    libraries from the injected bundle, which will eventually fix #2397.
    f1b019f0
annotation-sync-test.coffee 11.7 KB