Closed Bug 1215203 Opened 11 years ago Closed 11 years ago

Log a deprecation warning when DevToolsUtils.dbg_assert is called

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(firefox44 fixed)

RESOLVED FIXED
Firefox 44
Tracking Status
firefox44 --- fixed

People

(Reporter: fitzgen, Assigned: fitzgen)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Depends on: 1214775
I think that this extra logging is making tests time out way more :-/
Comment on attachment 8674360 [details] [diff] [review] Log a deprecation warning when DevToolsUtils.dbg_assert is called Review of attachment 8674360 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/shared/DevToolsUtils.js @@ +442,5 @@ > > // DEPRECATED: use DevToolsUtils.assert(condition, message) instead! > exports.dbg_assert = function dbg_assert(cond, e) { > + const deprecationMessage = "DevToolsUtils.dbg_assert is deprecated! Use DevToolsUtils.assert instead!\n" > + + Error().stack; We're going to have a lot of these messages right now, aren't we? Should we only print this message once, or wait a little while to give a chance to convert them over?
I think printing once is a nice solution. Should also solve the timeouts, I hope.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Woops...)
Status: REOPENED → NEW
Attachment #8674360 - Attachment is obsolete: true
Attachment #8674360 - Flags: review?(jlong)
(In reply to Nick Fitzgerald [:fitzgen][:nf] from comment #8) > Try push: > https://treeherder.mozilla.org/#/jobs?repo=try&revision=fabf3be5a257 Alright, all green this time around.
Comment on attachment 8674597 [details] [diff] [review] Log a deprecation warning when DevToolsUtils.dbg_assert is called Review of attachment 8674597 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/shared/DevToolsUtils.js @@ +448,5 @@ > + 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); I wish we could just use console everywhere! In certain cases 2 of these warnings will be dumped to the console, when `console.warn` is also outputting to stdout. Oh well, not a big deal.
Attachment #8674597 - Flags: review?(jlong) → review+
Status: NEW → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: