Closed Bug 508471 Opened 12 years ago Closed 12 years ago

Password Manager should use setProperty instead of setPropertyAsInterface for non-interface objects

Categories

(Toolkit :: Password Manager, defect, P1)

1.9.2 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla1.9.2a1
Tracking Status
status1.9.2 --- beta1-fixed
blocking1.9.1 --- .4+
status1.9.1 --- .4-fixed

People

(Reporter: mrbkap, Assigned: Dolske)

References

Details

(Keywords: verified1.9.1, verified1.9.2, Whiteboard: required by 505988)

Attachments

(1 file)

The password manager currently assumes that if it calls nsIWritablePropertyBag2.setPropertyAsInterface("property", non_interface_object) and then it calls nsIPropertyBag.getProperty("property") the result will be the original object. Before the fix to bug 505988, that was the case; however, we now need to change that.

Semantically, this assumption isn't correct, and there's even a semantically correct workaround that should make everybody happy (even with the fix in that bug): using nsIWritablePropertyBag.setProperty("property", blah) will do the Right Thing, even after the fix in the other bug.
Flags: blocking1.9.2?
Attached patch Patch v.1Splinter Review
Assignee: nobody → dolske
Attachment #392651 - Flags: review?
No additional tests needed, this is already extensively covered by test_basic_form_observer_*.html. Which passes with this patch, of course. Consumers of this interface will continue to work as before.
Attachment #392651 - Flags: review? → review+
(This blocks a P1 1.9.2 blocker)
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P1
Pushed http://hg.mozilla.org/mozilla-central/rev/d3f5cbab7b44
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
blocking1.9.1: ? → .4+
Mass change: adding fixed1.9.2 keyword

(This bug was identified as a mozilla1.9.2 blocker which was fixed before the mozilla-1.9.2 repository was branched (August 13th, 2009) as per this query: http://is.gd/2ydcb - if this bug is not actually fixed on mozilla1.9.2, please remove the keyword. Apologies for the bugspam)
Keywords: fixed1.9.2
Justin, what about the remaining calls to setPropertyAsInterface for username, password, and selectedLogin. Don't they require the change too?
No, those are actually interfaces.
Thanks Blake. So marking as verified fixed on 1.9.2 based on check-in and no breaking tests.
Status: RESOLVED → VERIFIED
Flags: in-testsuite+
Keywords: verified1.9.2
OS: Linux → All
Hardware: x86 → All
Version: unspecified → 1.9.2 Branch
Whiteboard: required by 505988
Verified fixed on 1.9.1 based on check-in and no orangeness.
Keywords: verified1.9.1
You need to log in before you can comment on or make changes to this bug.