"DEPRECATION WARNING: Search service falling back to synchronous initialization" in SelectionHandler

NEW
Unassigned

Status

()

4 years ago
4 years ago

People

(Reporter: jchen, Unassigned)

Tracking

Trunk
All
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
Saw this in the logcat,

> E/GeckoConsole(18426): [JavaScript Error: "DEPRECATION WARNING: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API.
> E/GeckoConsole(18426): You may find more details about this deprecation at: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning
> E/GeckoConsole(18426): jar:jar:file:///data/app/org.mozilla.fennec_nchen-1.apk!/assets/omni.ja!/components/nsSearchService.js 2891 SRCH_SVC__ensureInitialized
> E/GeckoConsole(18426): jar:jar:file:///data/app/org.mozilla.fennec_nchen-1.apk!/assets/omni.ja!/components/nsSearchService.js 4106 SearchService.prototype.defaultEngine
> E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 662 SelectionHandler.actions.SEARCH.label
> E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 502 SelectionHandler._getValue
> E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 538 SelectionHandler._updateMenu
> E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 1168 sh_positionHandles
> E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 343 sh_startSelection

See also bug 1017903 (different user of search service).

Comment 1

4 years ago
(In reply to Jim Chen [:jchen :nchen] from comment #0)
> Saw this in the logcat,
> 
> > E/GeckoConsole(18426): [JavaScript Error: "DEPRECATION WARNING: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API.
> > E/GeckoConsole(18426): You may find more details about this deprecation at: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning
> > E/GeckoConsole(18426): jar:jar:file:///data/app/org.mozilla.fennec_nchen-1.apk!/assets/omni.ja!/components/nsSearchService.js 2891 SRCH_SVC__ensureInitialized
> > E/GeckoConsole(18426): jar:jar:file:///data/app/org.mozilla.fennec_nchen-1.apk!/assets/omni.ja!/components/nsSearchService.js 4106 SearchService.prototype.defaultEngine
> > E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 662 SelectionHandler.actions.SEARCH.label
> > E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 502 SelectionHandler._getValue
> > E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 538 SelectionHandler._updateMenu
> > E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 1168 sh_positionHandles
> > E/GeckoConsole(18426): chrome://browser/content/SelectionHandler.js 343 sh_startSelection
> 
> See also bug 1017903 (different user of search service).

Bug 1017903 isn't even fixed yet?!

This one is a little trickier because we'd have to change the logic around to make it async. At the very least we could avoid evaluating Services.search.defaultEngine.name until this label function is called:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/SelectionHandler.js?force=1#661

Comment 2

4 years ago
You'll probably only run into this if the action bar is displayed before you ever type in the urlbar. So it's not quite as bad as bug 1017903, which happens during first page load.

Bug 927692 would also help with this.
You need to log in before you can comment on or make changes to this bug.