Closed Bug 1422269 Opened 7 years ago Closed 7 years ago

Allow asan-reporter to report crashed tabs immediately

Categories

(Core :: General, enhancement)

x86_64
Unspecified
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: decoder, Assigned: decoder)

References

(Blocks 1 open bug)

Details

(Keywords: sec-want, Whiteboard: [adv-main59-])

Attachments

(1 file)

Currently, the ASan reporter (added in bug 1386304) only reports issues when the browser is started. Since the issues are stored in /tmp, there is a high risk of losing crash information if the user doesn't restart their browser before rebooting. 

For tab crashes, we could instead use an observer to listen for the "ipc:content-shutdown" event and look for the "abnormal" key (thanks :ted for helping me to figure this out). This would allow us to call the reporter routine every time a tab crashes and submit those crashes right away.

I already got this working locally, so patch coming up shortly :)
Comment on attachment 8933613 [details]
Bug 1422269 - Allow asan-reporter to report crashed tabs immediately.

https://reviewboard.mozilla.org/r/204556/#review210216

Thanks! I didn't even know this thing existed. Just some small suggestions - see below.

::: browser/extensions/asan-reporter/bootstrap.js:61
(Diff revision 1)
> +  // Install a handler to observe tab crashes, so we can report those right
> +  // after they happen instead of relying on the user to restart the browser.
> +  this.TabCrashObserver.init();

This can just be:

`TabCrashObserver.init();`, which I think is more idiomatic.

Just to ensure this add-on fully removes itself if it's disabled at runtime, can you please add a `TabCrashObserver.uninit()` as well to remove the observer, and call that from the `shutdown` function?
Attachment #8933613 - Flags: review?(mconley) → review+
Comment on attachment 8933613 [details]
Bug 1422269 - Allow asan-reporter to report crashed tabs immediately.

https://reviewboard.mozilla.org/r/204556/#review210656

As discussed on IRC, since this is implemented as a system addon, there is no way or need to disable it, so skipping the shutdown parts. The other change is implemented as requested, carrying over r+.
Attachment #8933613 - Flags: review+
Pushed by choller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8173679f7bcb
Allow asan-reporter to report crashed tabs immediately. r=mconley
https://hg.mozilla.org/mozilla-central/rev/8173679f7bcb
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Whiteboard: [adv-main59-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: