// CloseTab closes the specified tab.
487217
func (remote *RemoteDebugger) CloseTab(tab *Tab) error {
	resp, err := responseError(remote.http.Get("/json/close/"+tab.ID, nil, nil))
	resp.Close()
	return err
}
518883
func (db *AgendaDB) Close() error {
	if db == nil || db.sdb == nil {
		return nil
	}
	return db.sdb.Close()
}
484951
func (r *Rabbus) Close() error {
	err := r.Amqp.Close()
	close(r.emit)
	close(r.emitOk)
	close(r.emitErr)
	close(r.reconn)
	return err
}
376438
func (d *domainClient) CloseTarget(ctx context.Context, args *CloseTargetArgs) (reply *CloseTargetReply, err error) {
	reply = new(CloseTargetReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Target.closeTarget", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Target.closeTarget", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Target", Op: "CloseTarget", Err: err}
	}
	return
}
900808
func (db *DB) Close() (err error) {
	close(db.quit)
	return db.ldb.Close()
}
631580
func (db *CLevelDB) Close() {
	db.db.Close()
	db.ro.Close()
	db.wo.Close()
	db.woSync.Close()
}
736547
func (n *Notifier) CloseTimeout(timeout time.Duration) error {
	if !atomic.CompareAndSwapUint32(&n._closed, 0, 1) {
		return nil
	}
	return n.waitTimeout(timeout)
}
710726
func (ditr debugIterator) Close() {
	fmt.Printf("%v.itr.Close()\n", ditr.label)
	ditr.itr.Close()
}
1191374
func (self *Commands) SwitchTab(id browser.TabID) (*browser.Tab, error) {
	return nil, fmt.Errorf(`NI`)
}
841193
func (self *Commands) NewTab(url string, args *NewTabArgs) (browser.TabID, error) {
	return ``, fmt.Errorf(`NI`)
}
753159
func (p *Pool) CloseConn(conn *grpc.ClientConn) {
	p.mu.Lock()
	defer p.mu.Unlock()
	for target, c := range p.conns {
		if c.conn == conn {
			p.closeTarget(target)
			break
		}
	}
	return
}
287458
func (c *Gcd) NewTab() (*ChromeTarget, error) {
	resp, err := http.Get(c.apiEndpoint + "/new")
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	body, errRead := ioutil.ReadAll(resp.Body)
	if errRead != nil {
		return nil, &GcdBodyReadErr{Message: errRead.Error()}
	}

	tabTarget := &TargetInfo{}
	err = json.Unmarshal(body, &tabTarget)
	if err != nil {
		return nil, &GcdDecodingErr{Message: err.Error()}
	}
	return openChromeTarget(c.addr, tabTarget)
}
353048
func (agent *ActionAgent) Close() {
	// cleanup initialized fields in the tablet entry
	f := func(tablet *topodatapb.Tablet) error {
		if err := topotools.CheckOwnership(agent.initialTablet, tablet); err != nil {
			return err
		}
		tablet.Hostname = ""
		tablet.MysqlHostname = ""
		tablet.PortMap = nil
		return nil
	}
	if _, err := agent.TopoServer.UpdateTabletFields(context.Background(), agent.TabletAlias, f); err != nil {
		log.Warningf("Failed to update tablet record, may contain stale identifiers: %v", err)
	}
}
34516
func (t *explainTablet) Close(ctx context.Context) error {
	return t.tsv.Close(ctx)
}
1347463
func (ldb *LevelDb) Close() (err error) {
	err = ldb.DB.Close()
	// Hide the closer error.
	_ = ldb.closer.Close()
	return err
}
390104
func (s *SocketHub) Close() {
	if s.closed {
		return
	}
	s.closed = true
	close(s.closer)
}
919884
function tabBrowser_closeTab(aEvent) {
    var event = aEvent || { };
    var type = (event.type == undefined) ? "menu" : event.type;

    // Disable tab closing animation for default behavior
    prefs.preferences.setPref(PREF_TABS_ANIMATE, false);

    // Add event listener to wait until the tab has been closed
    var self = { closed: false };
    function checkTabClosed() { self.closed = true; }
    this._controller.window.addEventListener("TabClose", checkTabClosed, false);

    switch (type) {
      case "closeButton":
        var button = this.getElement({type: "tabs_tabCloseButton",
                                     subtype: "tab", value: this.getTab()});
        this._controller.click(button);
        break;
      case "menu":
        var menuitem = new elementslib.Elem(this._controller.menus['file-menu'].menu_close);
        this._controller.click(menuitem);
        break;
      case "middleClick":
        var tab = this.getTab(event.index);
        this._controller.middleClick(tab);
        break;
      case "shortcut":
        var cmdKey = utils.getEntity(this.getDtds(), "closeCmd.key");
        this._controller.keypress(null, cmdKey, {accelKey: true});
        break;
      default:
        throw new Error(arguments.callee.name + ": Unknown event type - " + type);
    }

    try {
      this._controller.waitForEval("subject.tab.closed == true", TIMEOUT, 100,
                                   {tab: self});
    } finally {
      this._controller.window.removeEventListener("TabClose", checkTabClosed, false);
      prefs.preferences.clearUserPref(PREF_TABS_ANIMATE);
    }
  }