Rename nsIFormHistory to avoid changing interfaces

RESOLVED FIXED in Firefox 2 alpha1

Status

()

Firefox
Bookmarks & History
P2
normal
RESOLVED FIXED
11 years ago
4 years ago

People

(Reporter: bsmedberg, Assigned: bsmedberg)

Tracking

({fixed1.8.1})

unspecified
Firefox 2 alpha1
fixed1.8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

11 years ago
The nsIFormHistory interface was changed on the 1.8 branch (and it's a significantly different interface than it was). To avoid changing interfaces we should probably just rename this interface entirely. I can do this once the places codebase stabilizes a bit.
(Assignee)

Updated

11 years ago
Assignee: nobody → benjamin
Priority: -- → P2
Benjamin, are you still doing this? Should someone else own this? What needs to happen?
(Assignee)

Comment 2

11 years ago
I was waiting for a more stable codebase that's less likely to cause conflicts, but it's simple to do: it basically involves renaming nsIFormHistory to nsINavFormHistory or something else, and doing a global search/replace on code that uses this interface.

I'm on paternity leave for two weeks.
(Assignee)

Comment 3

11 years ago
Created attachment 216145 [details] [diff] [review]
Rename to nsIFormHistory2, rev. 1
Attachment #216145 - Flags: review?(bryner)
Attachment #216145 - Flags: review?(bryner) → review+
(Assignee)

Comment 4

11 years ago
Fixed on trunk and branch.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Looks like this killed prometheus and atlantia...

Comment 6

11 years ago
looks like this killed FireFTP too...

Comment 7

11 years ago
What's the difference between nsIFormHistory and nsIFormHistory2?

Comment 8

11 years ago
Maybe I don't understand what's happening here, but this seems to break backwards compatibility for extension authors. My own extension (Googlebar Lite) makes use of the nsIFormHistory interface. Renaming it will force me to maintain two branches of code for my extension: one for everything up to and including 1.5.0.x browsers, and one for 2.x and later. Is there some other mechanism available that provides support in all browsers? Or do I have to bite the bullet and either (a) fork my extension or (b) force all my users to upgrade to 2.0?

Comment 9

11 years ago
I believe that this trick has no problem:

var FORM_HISTORY = Components.classes['@mozilla.org/satchel/form-history;1'].getService(Components.interfaces.nsIFormHistory2 || Components.interfaces.nsIFormHistory);

Comment 10

11 years ago
thanks. finally, a fix that works. also, FireFTP updated its code to support this change.
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.