Closed
Bug 1394494
Opened 8 years ago
Closed 8 years ago
Use a custom Frame::Kind for special BHR frame types
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla57
| Tracking | Status | |
|---|---|---|
| firefox57 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
References
Details
Attachments
(2 files)
|
10.85 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
|
5.45 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•8 years ago
|
||
I think this should address your comments and make the behavior for deduplicating stack frames more consistent.
Attachment #8901893 -
Flags: review?(nfroyd)
Comment 2•8 years ago
|
||
Comment on attachment 8901893 [details] [diff] [review]
Use a custom Frame::Kind for special BHR frame types
Review of attachment 8901893 [details] [diff] [review]:
-----------------------------------------------------------------
r=me. WDYT about the below?
::: toolkit/components/backgroundhangmonitor/HangStack.h
@@ +88,5 @@
> , mPC(aPC)
> {}
>
> + explicit Frame(Kind aKind)
> + : mKind(aKind)
I realize it's a bit different from the other kinds, but maybe:
static Frame Content()
{
return Frame(CONTENT);
}
and so forth for JIT, WASM, SUPPRESSED, etc. along with a private Frame(Kind) constructor would be better? I guess you'd still want the MOZ_ASSERT in the single-argument Frame constructor, so I'm not totally sure you're winning here.
It would have the advantage of making the construction shorter:
HangStack::Frame::Content()
vs.
HangStack::Frame::Frame(HangStack::Frame::Kind::CONTENT);
Attachment #8901893 -
Flags: review?(nfroyd) → review+
| Assignee | ||
Comment 3•8 years ago
|
||
I think this patch should make the change you suggested. It definitely makes the construction sites nicer, but increases the amount of code a decent amount. What do you think of it?
Attachment #8902335 -
Flags: review?(nfroyd)
Comment 4•8 years ago
|
||
Comment on attachment 8902335 [details] [diff] [review]
Part 2: Switch to using separate static constructor methods for data-free frames
Review of attachment 8902335 [details] [diff] [review]:
-----------------------------------------------------------------
I like this better, personally.
Attachment #8902335 -
Flags: review?(nfroyd) → review+
Pushed by michael@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f58b56aa6171
Use a custom Frame::Kind for special BHR frame types, r=froydnj
Comment 6•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•