Fix step-in in chrome debugging by loading the promise library in the debugger server's compartment (Bug 834756); r=dtownsend,vporof

This commit is contained in:
Panos Astithas 2013-07-12 22:13:21 +03:00
parent f175b8ed70
commit e9012c3b84
2 changed files with 9 additions and 8 deletions

View File

@ -1474,7 +1474,9 @@ let SyntaxTreeVisitor = {
aCallbacks.onArrayExpression(aNode);
}
for (let element of aNode.elements) {
if (element) {
// TODO: remove the typeof check when support for SpreadExpression is
// added (bug 890913).
if (element && typeof this[element.type] == "function") {
this[element.type](element, aNode, aCallbacks);
}
}

View File

@ -24,8 +24,7 @@ let wantLogging = Services.prefs.getBoolPref("devtools.debugger.log");
Cu.import("resource://gre/modules/jsdebugger.jsm");
addDebuggerToGlobal(this);
let promise = Cu.import("resource://gre/modules/commonjs/sdk/core/promise.js").Promise;
const { defer, resolve, reject, all } = promise;
loadSubScript.call(this, "resource://gre/modules/commonjs/sdk/core/promise.js");
Cu.import("resource://gre/modules/devtools/SourceMap.jsm");
@ -198,11 +197,11 @@ var DebuggerServer = {
get initialized() this._initialized,
/**
* Performs cleanup tasks before shutting down the debugger server, if no
* connections are currently open. Such tasks include clearing any actor
* constructors added at runtime. This method should be called whenever a
* debugger server is no longer useful, to avoid memory leaks. After this
* method returns, the debugger server must be initialized again before use.
* Performs cleanup tasks before shutting down the debugger server. Such tasks
* include clearing any actor constructors added at runtime. This method
* should be called whenever a debugger server is no longer useful, to avoid
* memory leaks. After this method returns, the debugger server must be
* initialized again before use.
*/
destroy: function DS_destroy() {
if (!this._initialized) {