The default bug view has changed. See this FAQ.

Warn if session restore is initialized with deprecated synchronous initialization

RESOLVED FIXED in Firefox 21

Status

()

Firefox
Session Restore
--
enhancement
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Yoric, Assigned: darkowlzz)

Tracking

unspecified
Firefox 21
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mentor=Yoric][lang=js])

Attachments

(1 attachment, 1 obsolete attachment)

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.
Whiteboard: [mentor=Yoric][lang=js]
(Assignee)

Comment 1

4 years ago
Hi,
I would like to work on this bug.
I need help and guidance to fix the bug.

Thanks
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
Assignee: nobody → indiasuny000
(Assignee)

Comment 3

4 years ago
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.
Attachment #706461 - Flags: feedback?(dteller)
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"
Attachment #706461 - Flags: feedback?(dteller) → feedback+
(Assignee)

Comment 5

4 years ago
Created attachment 707598 [details] [diff] [review]
Mechanism for warning session restore initialized with deprecated synchronous initialization added

Changed the response string and info link.
Attachment #706461 - Attachment is obsolete: true
Attachment #707598 - Flags: review?(dteller)
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.
Attachment #707598 - Flags: review?(dteller) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/009b00bcce30
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/009b00bcce30
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Depends on: 837131
No longer depends on: 837131
You need to log in before you can comment on or make changes to this bug.