Remove SearchService's init-complete, replace by a promise that resolves or rejects as appropraite
Categories
(Firefox :: Search, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: mcheang, Assigned: standard8)
References
Details
Attachments
(1 file)
We send the "init-complete" notification regardless if SearchService initialization has failed or succeeded. Instead, we should send "init-failed" notification when SearchService has failed.
We are sending "init-complete" notification in SearchService.#init here
Extension System waits for "init-complete" here.
First, we need to create the "init-failed" notification by calling notifyObservers
. Then, there needs to be further investigation on how external callers will handle the new "init-failed" notification.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
We took a look at this and decided that it would be better to remove the "init-complete" notification. Instead, we can add a promiseInitialized
property that will resolve when the search service has successfully initialized, or reject if it has failed. Note, that this will not trigger initialization, unlike calling init()
.
This should be clearer and easier that trying to observe notifications and handling them appropriately. It also means that logic for detecting when the search service has finished initialising is all contained within the search service.
Assignee | ||
Comment 2•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Backed out for causing xpc failures on toolkit/components/search/tests/xpcshell/test_async.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/143c7ec76d2c7d587160128f03b96f88831a450e
Assignee | ||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
bugherder |
Description
•