     }
 
     /**
-     * Returns true if we are currently subscribed to our object (or in
-     * the process of obtaining a subscription).
+     * Returns true if we are currently subscribed to our object (or in the process of obtaining a
+     * subscription).
      */
     public function isActive () :Boolean
     {

import com.threerings.presents.dobj.Subscriber;

/**
 * A class that safely handles the asynchronous subscription to a
 * distributed object when it is not know if the subscription will
 * complete before the subscriber decides they no longer wish to be
 * subscribed.
 */
public class SafeSubscriber implements Subscriber
{
    private static const log :Log = Log.getLog(SafeSubscriber);
    /**
     * Creates a safe subscriber for the specified distributed object
     * which will interact with the specified subscriber.
     */
    public function SafeSubscriber (oid :int, subscriber :Subscriber)
    {
        // make sure they're not fucking us around
        if (oid <= 0) {
            throw new ArgumentError(
                "Invalid oid provided to safesub [oid=" + oid + "]");
        }
        if (subscriber == null) {
            throw new ArgumentError(
                "Null subscriber provided to safesub [oid=" + oid + "]");
        }

        _oid = oid;

        if (_pending) {
            // make sure we don't have an object reference
            if (_object != null) {
                log.warning("Have an object and am pending!? " + this, new Error());
            } else {
                // nothing to do but wait for the subscription to complete at which point we'll
                // pitch the object post-haste
                return;
            }
        }

        // make sure we have our object
        if (_object == null) {
            log.warning("Was active and not pending yet have no object!? " + this, new Error());
            // nothing to do since we're apparently already unsubscribed
            return;
        }
