function setCurrentPanelIfNecessary(panelPromise, panel)
        {
            if (this._panelForShowPromise !== panelPromise)
                return null;

            this.setCurrentPanel(panel);
            return panel;
        }
@param {!Promise.<!WebInspector.Panel>} panelPromise
@param {!WebInspector.Panel} panel
@return {?WebInspector.Panel}
@this {WebInspector.InspectorView}