Skip to content

Commit

Permalink
Bug 1614918 - Stop waiting for synchronous removeTab method in inspec…
Browse files Browse the repository at this point in the history
…tor init r=pbro

Differential Revision: https://phabricator.services.mozilla.com/D62576

--HG--
extra : moz-landing-system : lando
  • Loading branch information
juliandescottes committed Feb 12, 2020
1 parent 31990b3 commit 1d5a8ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions devtools/client/inspector/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Inspector.prototype = {
"visible";

// Setup the sidebar panels.
await this.setupSidebar();
this.setupSidebar();

await onMarkupLoaded;
this.isReady = true;
Expand Down Expand Up @@ -813,7 +813,7 @@ Inspector.prototype = {
async onSidebarToggle() {
this.is3PaneModeEnabled = !this.is3PaneModeEnabled;
await this.setupToolbar();
await this.addRuleView({ skipQueue: true });
this.addRuleView({ skipQueue: true });
},

/**
Expand Down Expand Up @@ -884,7 +884,7 @@ Inspector.prototype = {
* @params {String} defaultTab
* Thie id of the default tab for the sidebar.
*/
async addRuleView({ defaultTab = "ruleview", skipQueue = false } = {}) {
addRuleView({ defaultTab = "ruleview", skipQueue = false } = {}) {
const ruleViewSidebar = this.sidebarSplitBoxRef.current.startPanelContainer;

if (this.is3PaneModeEnabled) {
Expand All @@ -898,7 +898,7 @@ Inspector.prototype = {
// Force the rule view panel creation by calling getPanel
this.getPanel("ruleview");

await this.sidebar.removeTab("ruleview");
this.sidebar.removeTab("ruleview");

this.ruleViewSideBar.addExistingTab(
"ruleview",
Expand Down Expand Up @@ -932,7 +932,7 @@ Inspector.prototype = {
});

this.ruleViewSideBar.hide();
await this.ruleViewSideBar.removeTab("ruleview");
this.ruleViewSideBar.removeTab("ruleview");

if (skipQueue) {
this.sidebar.addExistingTab(
Expand Down Expand Up @@ -1040,7 +1040,7 @@ Inspector.prototype = {
/**
* Build the sidebar.
*/
async setupSidebar() {
setupSidebar() {
const sidebar = this.panelDoc.getElementById("inspector-sidebar");
const options = {
showAllTabsMenu: true,
Expand Down Expand Up @@ -1072,7 +1072,7 @@ Inspector.prototype = {

// Append all side panels

await this.addRuleView({ defaultTab });
this.addRuleView({ defaultTab });

// Inspector sidebar panels in order of appearance.
const sidebarPanels = [
Expand Down
2 changes: 1 addition & 1 deletion devtools/client/inspector/toolsidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ ToolSidebar.prototype = {
* @param {String} tabPanelId Optional. If provided, this ID will be used
* instead of the tabId to retrieve and remove the corresponding <tabpanel>
*/
async removeTab(tabId, tabPanelId) {
removeTab(tabId, tabPanelId) {
this._tabbar.removeTab(tabId);

this.emit("tab-unregistered", tabId);
Expand Down

0 comments on commit 1d5a8ef

Please sign in to comment.