Bug 781102 - Continue with debugger initialization after the editor finished loading, r=rcampbell

This commit is contained in:
Victor Porof 2012-08-09 00:36:58 +03:00
Родитель 1a7c2cdce7
Коммит 5edd37365a
2 изменённых файлов: 17 добавлений и 10 удалений

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

@ -51,15 +51,16 @@ let DebuggerController = {
window.removeEventListener("DOMContentLoaded", this._startupDebugger, true);
DebuggerView.initializePanes();
DebuggerView.initializeEditor();
DebuggerView.StackFrames.initialize();
DebuggerView.Breakpoints.initialize();
DebuggerView.Properties.initialize();
DebuggerView.Scripts.initialize();
DebuggerView.showCloseButton(!this._isRemoteDebugger && !this._isChromeDebugger);
DebuggerView.initializeEditor(function() {
DebuggerView.Scripts.initialize();
DebuggerView.StackFrames.initialize();
DebuggerView.Breakpoints.initialize();
DebuggerView.Properties.initialize();
DebuggerView.showCloseButton(!this._isRemoteDebugger && !this._isChromeDebugger);
this.dispatchEvent("Debugger:Loaded");
this._connect();
this.dispatchEvent("Debugger:Loaded");
this._connect();
}.bind(this));
},
/**

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

@ -32,8 +32,11 @@ let DebuggerView = {
/**
* Initializes the SourceEditor instance.
*
* @param function aCallback
* Called after the editor finishes initializing.
*/
initializeEditor: function DV_initializeEditor() {
initializeEditor: function DV_initializeEditor(aCallback) {
let placeholder = document.getElementById("editor");
let config = {
@ -45,7 +48,10 @@ let DebuggerView = {
};
this.editor = new SourceEditor();
this.editor.init(placeholder, config, this._onEditorLoad.bind(this));
this.editor.init(placeholder, config, function() {
this._onEditorLoad();
aCallback();
}.bind(this));
},
/**