Closed Bug 822508 Opened 12 years ago Closed 12 years ago

Providers can't specify 'null' for the profile info when the user is logged out.

Categories

(Firefox Graveyard :: SocialAPI, defect)

defect
Not set
normal

Tracking

(firefox19 affected)

RESOLVED FIXED
Firefox 20
Tracking Status
firefox19 --- affected

People

(Reporter: markh, Assigned: markh)

Details

(Whiteboard: [api-change][needs-doc-change])

Attachments

(1 file, 1 obsolete file)

Via bug 821323.  If the provider finds the user is not logged out, they can't specify |null| as the profile, but must instead specify |{}|.

Allowing null is a trivial fix and makes the api cleaner.  It's even possible we already document |null| is acceptable.  The following patch fixes this and includes tests.
Attachment #693180 - Flags: review?(jaws)
Attachment #693180 - Flags: review?(mixedpuppy)
Nominating for aurora as this is a trivial fix and it would be a shame to tell new providers coming on board they should work around this.
OS: Windows 7 → All
Hardware: x86_64 → All
Comment on attachment 693180 [details] [diff] [review]
Allow null for the profile, plus tests

Assigning profile to profile looks like a bug at first glance, I'd probably put the null check first and avoid being too clever:

if (!profile)
  profile = {};
this.profile = profile;
Attachment #693180 - Flags: review?(mixedpuppy)
Attachment #693180 - Flags: review?(jaws)
Attachment #693180 - Flags: review+
Attachment #693180 - Flags: approval-mozilla-aurora+
Actually, this isn't a regression, right? Given the lack of multi-provider on Aurora, seems like we probably actually don't need to land this there.
Assignee: nobody → mhammond
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #3)
> Actually, this isn't a regression, right? Given the lack of multi-provider
> on Aurora, seems like we probably actually don't need to land this there.

Yep, fair enough - removing tracking flag for 19.
Attachment #693180 - Flags: approval-mozilla-aurora+
not objecting to the change, but we do already have providers developing against 17+.  Docs should get updated.
Whiteboard: [api-change][needs-doc-change]
https://hg.mozilla.org/mozilla-central/rev/57adbfadcc85
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: