Closed Bug 1006139 Opened 6 years ago Closed 6 years ago

Contacts getAll caching is broken

Categories

(Core Graveyard :: DOM: Contacts, defect)

x86_64
Windows 8.1
defect
Not set

Tracking

(blocking-b2g:1.4+, firefox30 wontfix, firefox31 wontfix, firefox32 fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
mozilla32
blocking-b2g 1.4+
Tracking Status
firefox30 --- wontfix
firefox31 --- wontfix
firefox32 --- fixed
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(1 file)

Attached patch Patch, v1Splinter Review
ContactDispatcher calls Array.splice which modifies the array it receives... Other code assumes that the array is unmodified and stores it away for later use. This leads to badness.

Also, we were calling a failure callback when we meant to be calling a success callback...
Attachment #8417655 - Flags: review?(anygregor)
Attachment #8417655 - Flags: review?(anygregor) → review+
This is required to land bug 980549.
Blocks: 980549
blocking-b2g: --- → 1.4?
Blocking a blocker.
blocking-b2g: 1.4? → 1.4+
Oh wow. Nice catch… Took me a while to realize what was going on because of the asyncness of the code/bug.
nasty bug !

Why is it necessary to land bug 980549 ?
Also, why no tests ?
(In reply to Julien Wajsberg [:julienw] (away until 5th May) from comment #6)
> Why is it necessary to land bug 980549 ?
> Also, why no tests ?

Well, the fix for bug 980549 causes test_getAllContacts.html to go orange, so we can't land bug 980549 without this, and we then do have test coverage :)
https://hg.mozilla.org/mozilla-central/rev/8d79b7720a17
Assignee: nobody → bent.mozilla
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.