Closed Bug 1017903 Opened 9 years ago Closed 9 years ago
Synchronous initialization of search service when handling open search tag
I'm seeing this warning the first time I load a URL (testing in today's Nightly): DEPRECATION WARNING: Search service falling back to synchronous initialization. This is generally the consequence of an add-on using a deprecated search service API. You may find more details about this deprecation at: https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning jar:jar:file:///data/app/org.mozilla.fennec-1.apk!/assets/omni.ja!/components/nsSearchService.js 2802 SRCH_SVC__ensureInitialized jar:jar:file:///data/app/org.mozilla.fennec-1.apk!/assets/omni.ja!/components/nsSearchService.js 3724 SRCH_SVC_getVisible chrome://browser/content/browser.js 3734 Tab.prototype.handleEvent null 0 null I traced this back to this line: http://hg.mozilla.org/mozilla-central/annotate/b85b57f05fda/mobile/android/chrome/content/browser.js#l3739 We should find a way to do this asynchronously, especially as this could affect load times when loading an external URL on startup.
My bad, that should be passed as a callback to Services.search.init. Will be an easy fix though.
Assignee: nobody → liuche
This makes me really want to fix bug 935259, but that's less important.
Assignee: liuche → margaret.leibovic
Attachment #8483842 - Flags: review?(liuche)
Comment on attachment 8483842 [details] [diff] [review] Remove synchronous search service initialization Review of attachment 8483842 [details] [diff] [review]: ----------------------------------------------------------------- Nice.
Attachment #8483842 - Flags: review?(liuche) → review+
Backed this out for a robocop test failure: https://hg.mozilla.org/integration/fx-team/rev/ad3f52e2f336 https://tbpl.mozilla.org/php/getParsedLog.php?id=47516182&tree=Fx-Team
This is happening because testBrowserDiscovery expects the open search link to be parsed synchronously. To work around this, I added a line to testBrowserDiscovery to synchronously load the search service before starting the test, and that fixed things for me locally. Here's a try push: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=2b24c7483c39
This seems to solve the problem. I made a few retriggers to make sure the green wasn't a fluke.
Attachment #8487302 - Flags: review?(mark.finkle)
Attachment #8487302 - Flags: review?(mark.finkle) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 35
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.