Bug 1233865 - Remove deprecated dbg_assert. r=fitzgen

This commit is contained in:
J. Ryan Stinnett 2015-12-18 17:02:00 -06:00
parent 4a2c6917d8
commit 257e9b4c3b
2 changed files with 1 additions and 21 deletions

View File

@ -12,7 +12,7 @@ const { ActorPool, OriginalLocation, GeneratedLocation } = require("devtools/ser
const { ObjectActor, createValueGrip, longStringGrip } = require("devtools/server/actors/object");
const { DebuggerServer } = require("devtools/server/main");
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
const { assert, dbg_assert, dumpn, update, fetch } = DevToolsUtils;
const { assert, dumpn, update, fetch } = DevToolsUtils;
const { dirname, joinURI } = require("devtools/shared/path");
const promise = require("promise");
const PromiseDebugging = require("PromiseDebugging");
@ -354,8 +354,6 @@ EventLoop.prototype = {
}
}
dbg_assert(this._thread.state === "running", "Should be in the running state");
if (this._hooks.postNest) {
this._hooks.postNest(nestData);
}

View File

@ -461,24 +461,6 @@ exports.defineLazyGetter = function defineLazyGetter(aObject, aName, aLambda) {
});
};
// DEPRECATED: use DevToolsUtils.assert(condition, message) instead!
let haveLoggedDeprecationMessage = false;
exports.dbg_assert = function dbg_assert(cond, e) {
if (!haveLoggedDeprecationMessage) {
haveLoggedDeprecationMessage = true;
const deprecationMessage = "DevToolsUtils.dbg_assert is deprecated! Use DevToolsUtils.assert instead!\n"
+ Error().stack;
dump(deprecationMessage);
if (typeof console === "object" && console && console.warn) {
console.warn(deprecationMessage);
}
}
if (!cond) {
return e;
}
};
exports.defineLazyGetter(this, "AppConstants", () => {
if (isWorker) {
return {};