Closed Bug 505940 Opened 15 years ago Closed 15 years ago

Unnecessarily uploading records on first sync

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

(Keywords: regression)

Regression from bug 493363 and deepEquals was unnecessarily reporting false when the records were the same.

The problem arises from JSON.stringify then upload of a record that has a property with an undefined value. E.g., { a: undefined } That goes to the server as "{}".

So of course when we JSON.decode, we get {}, but the local record comes back as { a: undefined } and deepEqual's short circuit of comparing the number of keys will say they're different.

We need to actually compare the value to see that they're both undefined.
http://hg.mozilla.org/labs/weave/rev/0f2c69669dbf
Remove short-circuit logic of comparing number of keys for deepEquals and iterate through each key on both objects to make sure both have the same value.
Assignee: nobody → edilee
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.5
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.