Closed Bug 1587329 Opened 5 years ago Closed 5 years ago

Add more assertions where CorePS::sInstance or ActivePS::sInstance are used

Categories

(Core :: Gecko Profiler, task, P2)

71 Branch
task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

Details

Attachments

(1 file)

There have been some strange crashes, and to eliminate a source of troubles I would like to add more assertions where CorePS::sInstance or ActivePS::sInstance are used.

Add assertions that all sInstance pointers (from both CorePS and ActivePS)
are not null before being dereferenced.

This is probably more than needed, but it's only MOZ_ASSERTs limited to
Nightly, and it should give better feedback in case something goes wrong.

Eventually, I think it would be better to make most methods non-static, and have
a checked reference-to-instance getter.

Will wait until bug 1512500 lands, as it may affect this patch...

Depends on: 1512500
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0cba15804370
MOZ_ASSERT(sInstance) in all functions that dereference sInstance - r=canaltinova
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: