All users were logged out of Bugzilla on October 13th, 2018

isServiceInstantiatedByContractID should return false rather than throw when component isn't instantiated

RESOLVED FIXED in Firefox 57

Status

()

RESOLVED FIXED
a year ago
a year ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

(Blocks: 1 bug)

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

(Whiteboard: [qf:p3])

Attachments

(1 attachment)

(Assignee)

Description

a year ago
We spend several ms at startup constructing exception objects for startupRecorder.js ahen it checks for uninstantiated services. This isn't an issue for release builds, but it does add extra overhead and GC pressure for nightly talos runs, and ordinary nightly users, that we wouldn't see on release. Which means it gives us a bad picture of what's going on for normal users.
Comment hidden (mozreview-request)

Comment 2

a year ago
mozreview-review
Comment on attachment 8896658 [details]
Bug 1389848: Make isServiceInstantiated*() return false rather than throw for uninstantiated services.

https://reviewboard.mozilla.org/r/167952/#review173466
Attachment #8896658 - Flags: review?(ehsan) → review+
Whiteboard: [qf] → [qf:p3]

Comment 3

a year ago
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e19453003208
Make isServiceInstantiated*() return false rather than throw for uninstantiated services. r=ehsan

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e19453003208
https://hg.mozilla.org/mozilla-central/rev/1952f907b15b
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
If we wanted to completely avoid the startupRecorder overhead related to listing services, we should add a native method returning the list of already instantiated services, instead of having JS code iterating through all the registered contract ids. I didn't bother doing it at the time because it was nightly-only code. But thanks for improving it :-)
You need to log in before you can comment on or make changes to this bug.