Closed Bug 1393915 Opened 7 years ago Closed 7 years ago

Deduplicate consecutive "(content script)" frames in BHR

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: nika, Assigned: nika)

References

Details

Attachments

(1 file)

      No description provided.
Comment on attachment 8901303 [details] [diff] [review]
Deduplicate consecutive (content script) frames

Review of attachment 8901303 [details] [diff] [review]:
-----------------------------------------------------------------

The below can be done in a followup if you're interested in exploring it.

::: toolkit/components/backgroundhangmonitor/ThreadStackHelper.cpp
@@ +266,5 @@
>    if (!IsChromeJSScript(aEntry.script())) {
> +    // NOTE: Deduplicate consecutive (content script) frames.
> +    if (backFrame &&
> +        backFrame->GetKind() == HangStack::Frame::Kind::STRING &&
> +        !strcmp(backFrame->AsString(), "(content script)")) {

I agree that this does what you want...but I'm wondering if we could add another Frame::Kind for CONTENT_SCRIPT or something so we wouldn't have to deal with a string comparison every time.

Same goes for other string frames (e.g. do we want to deduplicate "(profiling suppressed)" above?  do we want to add a Frame::Kind for it?  etc.)
Attachment #8901303 - Flags: review?(nfroyd) → review+
Pushed by michael@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bbefb75a8098
Deduplicate consecutive (content script) frames, r=froydnj
https://hg.mozilla.org/mozilla-central/rev/bbefb75a8098
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: