Bug 1297758 - Fix race in inspector initialization to prevent this._splitter is undefined exception. r=bgrins

MozReview-Commit-ID: HkHLnCaNiFK
This commit is contained in:
Alexandre Poirot 2016-09-29 10:02:29 -07:00
Родитель 5df990c711
Коммит c2059f4882
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -448,8 +448,6 @@ Inspector.prototype = {
let SplitBox = this.React.createFactory(this.browserRequire(
"devtools/client/shared/components/splitter/split-box"));
this.panelWin.addEventListener("resize", this.onPanelWindowResize, true);
let splitter = SplitBox({
className: "inspector-sidebar-splitter",
initialWidth: INITIAL_SIDEBAR_SIZE,
@ -469,6 +467,8 @@ Inspector.prototype = {
this._splitter = this.ReactDOM.render(splitter,
this.panelDoc.getElementById("inspector-splitter-box"));
this.panelWin.addEventListener("resize", this.onPanelWindowResize, true);
// Persist splitter state in preferences.
this.sidebar.on("show", this.onSidebarShown);
this.sidebar.on("hide", this.onSidebarHidden);