Bug 828347 - Warn if session restore is initialized with deprecated synchronous initialization. r=dteller
authorSunny <indiasuny000@gmail.com>
Tue, 29 Jan 2013 10:50:04 -0500
changeset 130106 009b00bcce30d2bed015aa8af34ecae378fcb34c
parent 130105 d8d79ba17527141923665d79843b7b9fd1dc87a3
child 130107 507d85ab580785783b54d88fc6e2bb7a8c13dc28
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdteller
bugs828347
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 828347 - Warn if session restore is initialized with deprecated synchronous initialization. r=dteller
toolkit/components/search/nsSearchService.js
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -4,16 +4,17 @@
 
 const Ci = Components.interfaces;
 const Cc = Components.classes;
 const Cr = Components.results;
 
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/commonjs/promise/core.js");
+Components.utils.import("resource://gre/modules/Deprecated.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "DeferredTask",
   "resource://gre/modules/DeferredTask.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "OS",
   "resource://gre/modules/osfile.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
@@ -3775,16 +3776,17 @@ var engineMetadataService = {
    * Synchronous implementation of initializer
    *
    * This initializer is able to pick wherever the async initializer
    * is waiting. The asynchronous initializer is expected to stop
    * if it detects that the synchronous initializer has completed
    * initialization.
    */
   syncInit: function epsSyncInit() {
+    Deprecated.warning("Search service falling back to deprecated synchronous initializer.", "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning");
     LOG("metadata syncInit: starting");
     switch(this._initState) {
       case engineMetadataService._InitStates.NOT_STARTED:
         let jsonFile = new FileUtils.File(this._jsonFile);
         // 1. Load json file if it exists
         if (jsonFile.exists()) {
           try {
             let uri = Services.io.newFileURI(jsonFile);