Closed Bug 380857 Opened 17 years ago Closed 17 years ago

IE login info migration is broken (can't call nsILoginInfo::Init when using the external string API)

Categories

(Firefox :: Migration, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 alpha5

People

(Reporter: Gavin, Assigned: Dolske)

References

Details

Attachments

(1 file)

Since C++ callers like the ones in nsIEProfileMigrator.cpp can't pass in void strings (apparently because the external string API has no such thing), there's no way for them to pass in the "null" that they need to to make nsILoginInfo::Init() behave correctly. nsILoginInfo's compare() functions rely on this distinction when comparing nsILoginInfos, they probably shouldn't.

We need to uncomment the relevant lines in nsIEProfileMigrator.cpp when this is fixed. I think we need to fix this before shipping a5.
Flags: blocking-firefox3?
Summary: Remove distinction between null and "" in nsILoginInfo implementation → Remove distinction between null and "" in nsILoginInfo implementation (IE login info migration is broken)
SetIsVoid?
Flags: blocking-firefox3? → blocking-firefox3+
Attached patch Patch v1Splinter Review
This avoids the problem by initializing the known fields directly, instead of using calling Init().

Compiles, but is untested because I upgraded this machine to IE7 yesterday. :-(
Attachment #266331 - Flags: review?(gavin.sharp)
Comment on attachment 266331 [details] [diff] [review]
Patch v1

I'm still seeing some weird failure to import certain passwords, but that's almost certainly another bug (perhaps one that's already filed).
Attachment #266331 - Flags: review?(gavin.sharp) → review+
mozilla/browser/components/migration/src/nsIEProfileMigrator.cpp 	1.59
Status: NEW → ASSIGNED
Component: Password Manager → Migration
QA Contact: password.manager → migration
Summary: Remove distinction between null and "" in nsILoginInfo implementation (IE login info migration is broken) → can't call nsILoginInfo::Init from C++ (IE login info migration is broken)
marking FIXED, unless I'm missing something.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
We fixed the migrator, but not the reliance on void strings. Given the easy workaround and relatively uncommon need, I think leaving things as-is is acceptable. The external string API might eventually get void strings anyways.
Summary: can't call nsILoginInfo::Init from C++ (IE login info migration is broken) → IE login info migration is broken (can't call nsILoginInfo::Init when using the external string API)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: