Last Comment Bug 828347 - Warn if session restore is initialized with deprecated synchronous initialization
: Warn if session restore is initialized with deprecated synchronous initializa...
Status: RESOLVED FIXED
[mentor=Yoric][lang=js]
:
Product: Firefox
Classification: Client Software
Component: Session Restore (show other bugs)
: unspecified
: All All
: -- enhancement (vote)
: Firefox 21
Assigned To: Sunny [:darkowlzz]
:
Mentors:
Depends on: 812859
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-09 07:36 PST by David Rajchenbach-Teller [:Yoric] (please use "needinfo")
Modified: 2013-02-01 07:48 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Added deprecation warning to syncInit (1.94 KB, patch)
2013-01-25 10:15 PST, Sunny [:darkowlzz]
dteller: feedback+
Details | Diff | Splinter Review
Mechanism for warning session restore initialized with deprecated synchronous initialization added (2.04 KB, patch)
2013-01-29 06:12 PST, Sunny [:darkowlzz]
dteller: review+
Details | Diff | Splinter Review

Description David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2013-01-09 07:36:54 PST
Since bug 532150, session storage have a snappy asynchronous initialization and a blocking synchronous initialization, for backwards compatibility with add-ons.

Bug 812859 introduces a mechanism for marking an API as deprecated. We should make use of this mechanism to warn in case of synchronous initializations.
Comment 1 Sunny [:darkowlzz] 2013-01-24 11:32:15 PST
Hi,
I would like to work on this bug.
I need help and guidance to fix the bug.

Thanks
Comment 2 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2013-01-24 11:45:12 PST
Great :)

The objective is to add a deprecation warning to method syncInit of nsSearchService: http://dxr.mozilla.org/mozilla-central/toolkit/components/search/nsSearchService.js.html#l3782

Deprecation warnings are implemented with module Deprecated.jsm, as per http://dxr.mozilla.org/mozilla-central/toolkit/content/Deprecated.jsm.html?string=Deprecated.jsm#l60
Comment 3 Sunny [:darkowlzz] 2013-01-25 10:15:16 PST
Created attachment 706461 [details] [diff] [review]
Added deprecation warning to syncInit

Check if this is correct and can you suggest some warning text and required URL.
Comment 4 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2013-01-29 01:06:24 PST
Comment on attachment 706461 [details] [diff] [review]
Added deprecation warning to syncInit

Review of attachment 706461 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks.

::: toolkit/components/search/nsSearchService.js
@@ +3780,5 @@
>     * if it detects that the synchronous initializer has completed
>     * initialization.
>     */
>    syncInit: function epsSyncInit() {
> +    Deprecated.warning("Oops. This is deprecated. :(", "https://bugzilla.mozilla.org/show_bug.cgi?id=828347");

I'd go for:
-"Search service falling back to deprecated synchronous initializer."
- "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning"
Comment 5 Sunny [:darkowlzz] 2013-01-29 06:12:12 PST
Created attachment 707598 [details] [diff] [review]
Mechanism for warning session restore initialized with deprecated synchronous initialization added

Changed the response string and info link.
Comment 6 David Rajchenbach-Teller [:Yoric] (please use "needinfo") 2013-01-29 06:20:09 PST
Comment on attachment 707598 [details] [diff] [review]
Mechanism for warning session restore initialized with deprecated synchronous initialization added

Review of attachment 707598 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me.
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-01-29 07:53:14 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/009b00bcce30
Comment 8 Ryan VanderMeulen [:RyanVM] 2013-01-29 17:01:08 PST
https://hg.mozilla.org/mozilla-central/rev/009b00bcce30

Note You need to log in before you can comment on or make changes to this bug.