On Mon, Sep 12, 2016 at 12:22 PM, Boris Zbarsky <[email protected]> wrote:
It brings up one potential concern with Move: since the > >> callee might not take the value (intentionally or unintentionally), the >> caller must *refrain* from caring about the state of its Move()'d >> variable, between the Move() operation and any reassignment/cleanup. >> > > It's worse than that. For a wide range of callers (anyone handing the ref > across threads), the caller must check immediately whether the callee > actually took the value and if not make sure things are released on the > proper thread... > Could you go into more detail here? Either the caller will free it, or the callee will free it --- but they're both on the same thread. If the callee puts the reference someplace where another thread will free it, then that's the operation that needs to be audited. _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

