Closed
Bug 1214775
Opened 11 years ago
Closed 11 years ago
Add DevToolsUtils.assert and deprecate DevToolsUtils.dbg_assert
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(firefox44 fixed)
RESOLVED
FIXED
Firefox 44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: fitzgen, Assigned: fitzgen)
References
Details
Attachments
(1 file)
|
2.54 KB,
patch
|
jlong
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8673803 -
Flags: review?(jlong)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Comment 2•11 years ago
|
||
Comment on attachment 8673803 [details] [diff] [review]
Add DevToolsUtils.assert and deprecate DevToolsUtils.dbg_assert
Review of attachment 8673803 [details] [diff] [review]:
-----------------------------------------------------------------
Ooooo, I like! Should we still call `reportException` even outside of debug mode though? All that does it print it somewhere, and make tests fail right?
I'm not sure that tests are running with DEBUG_JS_MODULES turned on yet, at least I haven't changed anything regarding that. How do we change default testing options?
Attachment #8673803 -
Flags: review?(jlong) → review+
| Assignee | ||
Comment 3•11 years ago
|
||
(In reply to James Long (:jlongster) from comment #2)
> Comment on attachment 8673803 [details] [diff] [review]
> Add DevToolsUtils.assert and deprecate DevToolsUtils.dbg_assert
>
> Review of attachment 8673803 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Ooooo, I like! Should we still call `reportException` even outside of debug
> mode though? All that does it print it somewhere, and make tests fail right?
Yes, I was unsure if this might discourage using DTU.assert in tight-ish loops. Maybe I am worrying over nothing. Will bring it up at the meeting today.
> I'm not sure that tests are running with DEBUG_JS_MODULES turned on yet, at
> least I haven't changed anything regarding that. How do we change default
> testing options?
A few ways to work around this, which I think can be follow ups:
* Add a flag (similar to DTU.dumpn.wantLogging) to let folks (or tests' head.js) explicitly opt in
* Similarly, figure out a way to set DEBUG_JS_MODULES in tests' head.js
* Somehow find a way to determine if we are running tests right now (not sure if this exists, but maybe we set a pref or env var somewhere...)
We may want to extend this to be set with plain old DEBUG builds, too. Then we will know that at least half of the treeherder runs and tests will be running with these assertions enabled.
| Assignee | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen][:nf] from comment #3)
> (In reply to James Long (:jlongster) from comment #2)
> > Comment on attachment 8673803 [details] [diff] [review]
> > Add DevToolsUtils.assert and deprecate DevToolsUtils.dbg_assert
> >
> > Review of attachment 8673803 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > Ooooo, I like! Should we still call `reportException` even outside of debug
> > mode though? All that does it print it somewhere, and make tests fail right?
>
> Yes, I was unsure if this might discourage using DTU.assert in tight-ish
> loops. Maybe I am worrying over nothing. Will bring it up at the meeting
> today.
That's a good point. I like that actually, I say we leave it like it is. We need to promote DEBUG_JS_MODULES as well, and this will be more incentive for devs to turn it on locally.
> > I'm not sure that tests are running with DEBUG_JS_MODULES turned on yet, at
> > least I haven't changed anything regarding that. How do we change default
> > testing options?
>
> A few ways to work around this, which I think can be follow ups:
>
> * Add a flag (similar to DTU.dumpn.wantLogging) to let folks (or tests'
> head.js) explicitly opt in
> * Similarly, figure out a way to set DEBUG_JS_MODULES in tests' head.js
> * Somehow find a way to determine if we are running tests right now (not
> sure if this exists, but maybe we set a pref or env var somewhere...)
We set `DevToolsUtils.testing = true` in the debugger's head.js, is that standard?
> We may want to extend this to be set with plain old DEBUG builds, too. Then
> we will know that at least half of the treeherder runs and tests will be
> running with these assertions enabled.
Yeah, we should do that.
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•