diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-12-24 05:06:54 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-12-24 05:06:54 +0100 |
commit | 202e78b731776c3a102ca2f465ed3864b27effd3 (patch) | |
tree | a122aa277f3a35df7b06216c1f82054c215339b4 /toolkit/components/search/orginal/nsSearchService.js | |
parent | 3cf7e874fecf940ffeec00bafd3cf96d5c1b2a46 (diff) | |
download | UXP-202e78b731776c3a102ca2f465ed3864b27effd3.tar UXP-202e78b731776c3a102ca2f465ed3864b27effd3.tar.gz UXP-202e78b731776c3a102ca2f465ed3864b27effd3.tar.lz UXP-202e78b731776c3a102ca2f465ed3864b27effd3.tar.xz UXP-202e78b731776c3a102ca2f465ed3864b27effd3.zip |
Add performance warnings to Deprecated module.
Adds a dedicated handler for performance warnings to be logged to
consoles if known performance-impacting methods are called.
Search service init is changed from a deprecation warning to a
performance warning for synchronous init.
This also re-enables the warning for the Basilisk & Co. search service
initialization which was previously removed in [a930a79]
See also the discussion on #916.
Diffstat (limited to 'toolkit/components/search/orginal/nsSearchService.js')
-rw-r--r-- | toolkit/components/search/orginal/nsSearchService.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toolkit/components/search/orginal/nsSearchService.js b/toolkit/components/search/orginal/nsSearchService.js index 8d81e1a27..6b23724a7 100644 --- a/toolkit/components/search/orginal/nsSearchService.js +++ b/toolkit/components/search/orginal/nsSearchService.js @@ -2917,12 +2917,12 @@ SearchService.prototype = { return; } - let warning = + let performanceWarning = "Search service falling back to synchronous initialization. " + "This is generally the consequence of an add-on using a deprecated " + "search service API."; - Deprecated.warning(warning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning"); - LOG(warning); + Deprecated.perfWarning(performanceWarning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning"); + LOG(performanceWarning); engineMetadataService.syncInit(); this._syncInit(); |